mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
This commit is contained in:
committed by
Rich Trott
parent
3b124e0a73
commit
85dd9e8333
29
test/tools/test_configure.py
Normal file
29
test/tools/test_configure.py
Normal file
@@ -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()
|
||||
Reference in New Issue
Block a user