Skip to content

Commit d73a7a1

Browse files
authored
Remove shell=True from rebaseline_tests.py. NFC (#25158)
This was added in #25142 to fix windows but inadvertently broke linux. Turns out the `shell=True` means that first argument should be a single string, and not and array of arguments. For some reason using an array along with `shell=True` was causing `subprocess.check_call` to run `test/runner` only without any aguments.
1 parent 2da545c commit d73a7a1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

test/runner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ def prepend_default(arg):
576576
tests = skip_requested_tests(tests, modules)
577577
tests = args_for_random_tests(tests, modules)
578578

579+
if not tests:
580+
print('ERROR: no tests to run')
581+
return 1
582+
579583
if not options.start_at and options._continue:
580584
if os.path.exists(common.LAST_TEST):
581585
options.start_at = utils.read_file(common.LAST_TEST).strip()

tools/maint/rebaseline_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
root_dir = os.path.dirname(os.path.dirname(script_dir))
2121

2222
sys.path.insert(0, root_dir)
23-
from tools import utils
23+
from tools import utils, shared
2424

2525
TESTS = [
2626
'other.test_small_js_flags',
@@ -86,7 +86,7 @@ def main():
8686
print('tree is not clean')
8787
return 1
8888

89-
subprocess.check_call([os.path.join('test', 'runner'), '--rebaseline', '--browser=0'] + TESTS, cwd=root_dir, shell=True)
89+
subprocess.check_call([shared.bat_suffix(os.path.join('test', 'runner')), '--rebaseline', '--browser=0'] + TESTS, cwd=root_dir)
9090

9191
output = run(['git', 'status', '-uno', '--porcelain'])
9292
filenames = []

0 commit comments

Comments
 (0)