-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
None
-
Correctness
-
ALL
The changes from c019228 as part of SERVER-68699 cause resmoke to no longer error when given a nonexistent JavaScript file at the command line. This is confusing behavior to engineers who mistyped the path to a JavaScript file (e.g. a JavaScript file generated by the fuzzer).
Steps to reproduce
$ python buildscripts/resmoke.py run --suite=core does_not_exist.js ... [executor] 15:02:58.060Z Skipping js_test, no tests to run [resmoke] 15:02:58.060Z ================================================================================ [resmoke] 15:02:58.060Z Summary of core suite: No tests ran. Suite did not run any tests. [resmoke] 15:02:58.060Z Exiting with code: 0
The prior and expected output would instead be the following:
Traceback (most recent call last): File "/home/ubuntu/mongo/buildscripts/resmoke.py", line 20, in <module> entrypoint() File "/home/ubuntu/mongo/buildscripts/resmoke.py", line 16, in entrypoint cli.main(sys.argv) File "/home/ubuntu/mongo/buildscripts/resmokelib/cli.py", line 32, in main subcommand.execute() File "/home/ubuntu/mongo/buildscripts/resmokelib/run/__init__.py", line 132, in execute self.run_tests() File "/home/ubuntu/mongo/buildscripts/resmokelib/run/__init__.py", line 244, in run_tests suites = self._get_suites() File "/home/ubuntu/mongo/buildscripts/resmokelib/run/__init__.py", line 616, in _get_suites return suitesconfig.get_suites(config.SUITE_FILES, config.TEST_FILES) File "/home/ubuntu/mongo/buildscripts/resmokelib/suitesconfig.py", line 115, in get_suites for test in override_suite.tests: File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/suite.py", line 103, in tests self._tests, self._excluded = self._get_tests_for_kind(self.test_kind) File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/suite.py", line 125, in _get_tests_for_kind return _selector.filter_tests(test_kind, selector_config) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 801, in filter_tests return selector.select(selector_config) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 509, in select return _Selector.select(self, selector_config) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 460, in select test_list = _TestList(self._test_file_explorer, roots, self._tests_are_files) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 167, in __init__ self._roots = self._expand_files(roots) if tests_are_files else roots File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 177, in _expand_files raise ValueError("Unrecognized test file: {}".format(test)) ValueError: Unrecognized test file: does_not_exist.js
- is caused by
-
SERVER-68699 Write a test that checks that resmoke suite config is valid
- Closed