diff options
author | Patrick Housley <patrick.f.housley@gmail.com> | 2019-10-18 18:01:59 -0500 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-11-05 19:36:28 -0800 |
commit | 85dd9e8333f227dcdcbe86ae45f239a2b5cef030 (patch) | |
tree | cf7e3089f6d0940f95a4f8c496e1d1232cf146aa | |
parent | 3b124e0a7342ebbeb09a922586f8291d88cadc0e (diff) | |
download | android-node-v8-85dd9e8333f227dcdcbe86ae45f239a2b5cef030.tar.gz android-node-v8-85dd9e8333f227dcdcbe86ae45f239a2b5cef030.tar.bz2 android-node-v8-85dd9e8333f227dcdcbe86ae45f239a2b5cef030.zip |
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: https://github.com/nodejs/node/issues/29415
PR-URL: https://github.com/nodejs/node/pull/30033
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | test/tools/test_configure.py | 29 | ||||
-rw-r--r-- | test/tools/test_js2c.py (renamed from test/tools/test-js2c.py) | 0 |
3 files changed, 30 insertions, 1 deletions
@@ -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: diff --git a/test/tools/test_configure.py b/test/tools/test_configure.py new file mode 100644 index 0000000000..c4e65192c9 --- /dev/null +++ b/test/tools/test_configure.py @@ -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() diff --git a/test/tools/test-js2c.py b/test/tools/test_js2c.py index 2045621170..2045621170 100644 --- a/test/tools/test-js2c.py +++ b/test/tools/test_js2c.py |