Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: test configure ninja
- Updated the tooltest target to run unittest module
- Renamed test/tools/test-js2c.py to be discoverable by unittest module
- Added test class for `configure` shell script
- Added a test to ensure `configure` script exits with status code zero
when passed the `--ninja` flag

Closes #29415
  • Loading branch information
Patrick Housley
Patrick Housley committed Oct 25, 2019
commit 08b5e133ec2eaa09130e5a088b652b3031170d44
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ jstest: build-addons build-js-native-api-tests build-node-api-tests ## Runs addo

.PHONY: tooltest
tooltest:
@$(PYTHON) test/tools/test-js2c.py
@$(PYTHON) -m unittest discover -s ./test/tools

.PHONY: coverage-run-js
coverage-run-js:
Expand Down
29 changes: 29 additions & 0 deletions test/tools/test_configure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import sys
import os
import unittest
import subprocess


class ConfigureTests(unittest.TestCase):
def setUp(self):
self.working_dir = os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'..', '..'
)
)

def test_ninja(self):
subprocess.check_call(
'./configure --ninja',
cwd=self.working_dir,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)


if (__name__ == '__main__' and
sys.platform in ['linux', 'linux2', 'darwin', 'cygwin']):

unittest.main()
File renamed without changes.