[SERVER-30755] KeyError "selector" is raised when no tests or test suites specified to resmoke.py Created: 21/Aug/17  Updated: 30/Oct/23  Resolved: 21/Nov/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.5.10
Fix Version/s: 3.7.1

Type: Bug Priority: Minor - P4
Reporter: Max Hirschhorn Assignee: Jonathan Abrahams
Resolution: Fixed Votes: 0
Labels: tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-31725 resmokelib.parser.create_test_members... Closed
Related
related to SERVER-32285 dbtests suite runs no tests in resmok... Closed
is related to SERVER-28636 Resmoke should treat --executor=foo a... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

$ python buildscripts/resmoke.py 
[resmoke] 2017-08-21T08:44:53.369-0400 resmoke.py invocation: buildscripts/resmoke.py
Traceback (most recent call last):
  File "buildscripts/resmoke.py", line 186, in <module>
    main()
  File "buildscripts/resmoke.py", line 141, in main
    suites = resmokelib.parser.get_suites(values, args)
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/parser.py", line 364, in get_suites
    suite = testing.suite.Suite(suite_filename, suite_config)
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/testing/suite.py", line 31, in __init__
    self.tests = self._get_tests_for_kind(self.test_kind)
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/testing/suite.py", line 52, in _get_tests_for_kind
    test_info = self.get_selector_config()
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/testing/suite.py", line 86, in get_selector_config
    return self._suite_config["selector"]
KeyError: 'selector'

Sprint: TIG 2017-12-04
Participants:
Linked BF Score: 0

 Description   

Prior to the changes from SERVER-28636, invoking python buildscripts/resmoke.py would caused a "Must specify either --suites or a list of tests" error. We should either restore this behavior by (a) detecting when --suites hasn't been specified (it currently defaults to with_server.yml and args is an empty list), or (b) changing the with_server.yml and no_server.yml YAML suite configurations to specify

selector:
  roots: []

and have resmoke.py log "No tests ran" when invoking python buildscripts/resmoke.py.



 Comments   
Comment by Githook User [ 21/Nov/17 ]

Author:

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

Message: SERVER-30755 KeyError "selector" is raised when no tests or test suites specified to resmoke.py
Branch: master
https://github.com/mongodb/mongo/commit/9c6381687e0bf72122c1b5d7aa11fb949a6145b4

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