[SERVER-28302] resmoke.py parser should accept files that don't end in .js Created: 14/Mar/17  Updated: 06/Dec/17  Resolved: 31/May/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.5.9

Type: Bug Priority: Major - P3
Reporter: Kyle Suarez Assignee: Jonathan Abrahams
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-25293 output of hooks in hook.py should go ... Closed
Related
related to SERVER-30922 resmoke should error if you give it a... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 2017-05-08, TIG 2017-05-29, TIG 2017-06-19
Participants:
Linked BF Score: 0

 Description   

The resmoke.py parser only accepts files that end with ".js". This restriction is too strict, and it means that you can't use the --findSuites tool for unit tests and integration tests.

Ideally, I'd like to be able to do one of the following:

$ resmoke -f src/mongo/db/nesting_depth_test.cpp
$ resmoke -f build/integration_tests/nesting_depth_test

Unfortunately, both trigger an exception:

Traceback (most recent call last):
  File "/home/ksuarz/code/mongo/buildscripts/resmoke.py", line 194, in <module>
    main()
  File "/home/ksuarz/code/mongo/buildscripts/resmoke.py", line 150, in main
    suites = resmokelib.parser.get_suites(values, args)
  File "/home/ksuarz/code/mongo/buildscripts/resmokelib/parser.py", line 324, in get_suites
    suite_config = _make_jstests_config(args)
  File "/home/ksuarz/code/mongo/buildscripts/resmokelib/parser.py", line 404, in _make_jstests_config
    % (pathname))
optparse.OptionValueError: Expected a list of JS files, but got 'src/mongo/db/nesting_depth_test.cpp'



 Comments   
Comment by Githook User [ 31/May/17 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-28302 Add empty executor to mongos_test.yml
Branch: master
https://github.com/mongodb/mongo/commit/d55e6feaf08984e849e6ef506e52d4915699ebcf

Comment by Kyle Suarez [ 26/May/17 ]

Awesome, thanks jonathan.abrahams!

Comment by Githook User [ 26/May/17 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-28302 resmoke.py parser should accept files that don't end in .js
Branch: master
https://github.com/mongodb/mongo/commit/b6c1b6b6a9bfe17d3c21d87ee8516e069dadfa3c

Comment by Mathias Stearn [ 20/Mar/17 ]

There is a related problem that you can't run just one integration test via resmoke:

> resmoke --executor=cpp_integration_tests build/integration_tests/ugly_bson_integration_test       
/home/mstearn/10gen/mongo/buildscripts/resmokelib/core/process.py:33: RuntimeWarning: Falling back to using the subprocess module because subprocess32 isn't available. When using the subprocess module, a child process may trigger an invalid free(). See SERVER-22219 for more details.
  RuntimeWarning)
Traceback (most recent call last):
  File "buildscripts/resmoke.py", line 194, in <module>
    main()
  File "buildscripts/resmoke.py", line 150, in main
    suites = resmokelib.parser.get_suites(values, args)
  File "/home/mstearn/10gen/mongo/buildscripts/resmokelib/parser.py", line 324, in get_suites
    suite_config = _make_jstests_config(args)
  File "/home/mstearn/10gen/mongo/buildscripts/resmokelib/parser.py", line 404, in _make_jstests_config
    % (pathname))
optparse.OptionValueError: Expected a list of JS files, but got 'build/integration_tests/ugly_bson_integration_test'

The same problem exists for unittests, but is less of a pain since they can just be run directly without any setup.

Generated at Thu Feb 08 04:17:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.