build: initial Windows support patches
This commit is contained in:
7
test.py
7
test.py
@@ -170,6 +170,7 @@ def parse_examples_to_run_file(
|
||||
|
||||
# Set the full path for the example.
|
||||
example_path = os.path.join(cpp_executable_dir, example_path)
|
||||
example_path += '.exe' if sys.platform == 'win32' else ''
|
||||
example_name = os.path.join(
|
||||
os.path.relpath(cpp_executable_dir, NS3_BUILDDIR),
|
||||
example_name)
|
||||
@@ -1070,6 +1071,7 @@ def run_tests():
|
||||
# match what is done in the CMakeLists.txt file.
|
||||
#
|
||||
test_runner_name = "%s%s-%s%s" % (APPNAME, VERSION, "test-runner", BUILD_PROFILE_SUFFIX)
|
||||
test_runner_name += '.exe' if sys.platform == 'win32' else ''
|
||||
|
||||
#
|
||||
# Run ns3 to make sure that everything is built, configured and ready to go
|
||||
@@ -1299,7 +1301,7 @@ def run_tests():
|
||||
# This translates into allowing the following options with respect to the
|
||||
# suites
|
||||
#
|
||||
# ./test,py: run all of the suites and examples
|
||||
# ./test.py: run all of the suites and examples
|
||||
# ./test.py --constrain=core: run all of the suites of all kinds
|
||||
# ./test.py --constrain=unit: run all unit suites
|
||||
# ./test.py --suite=some-test-suite: run a single suite
|
||||
@@ -1399,6 +1401,8 @@ def run_tests():
|
||||
stderr_results = stderr_results.decode()
|
||||
if len(stderr_results) == 0:
|
||||
processors = int(stdout_results)
|
||||
else:
|
||||
processors = os.cpu_count()
|
||||
|
||||
if (options.process_limit):
|
||||
if (processors < options.process_limit):
|
||||
@@ -1508,6 +1512,7 @@ def run_tests():
|
||||
# Remove any arguments and directory names from test.
|
||||
test_name = test.split(' ', 1)[0]
|
||||
test_name = os.path.basename(test_name)
|
||||
test_name = test_name[:-4] if sys.platform == 'win32' else test_name
|
||||
|
||||
# Don't try to run this example if it isn't runnable.
|
||||
if test_name in ns3_runnable_programs_dictionary:
|
||||
|
||||
Reference in New Issue
Block a user