Skip to content

Commit

Permalink
Finch: Fix run_finch_smoke_tests.py interface
Browse files Browse the repository at this point in the history
run_finch_smoke_tests.py was expecting it to be invoked with the 'run'
command, however, it wasn't, and it turns out that only local scripts
are invoked with 'run' and isolated scripts are invoked directly, so
this CL fixes the issue.

Bug: 1233603
Change-Id: Ib643d9dde4609884cab20fb250d0bba4a0981022
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3063778
Auto-Submit: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Arthur Wang <wuwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907331}
  • Loading branch information
Yuke Liao authored and Chromium LUCI CQ committed Jul 31, 2021
1 parent b18dd7f commit 1c21521
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions testing/scripts/run_variations_smoke_tests.py
Expand Up @@ -6,6 +6,7 @@
when parsing a newly given Finch seed.
"""

import argparse
import json
import logging
import os
Expand All @@ -17,8 +18,11 @@
def main_run(args):
"""Runs the Finch smoke tests."""
logging.basicConfig(level=logging.INFO)
common.record_local_script_results('run_finch_smoke_tests', args.output, [],
True)
parser = argparse.ArgumentParser()
parser.add_argument('--isolated-script-test-output', type=str, required=True)
args, _ = parser.parse_known_args()
with open(args.isolated_script_test_output, 'w') as f:
common.record_local_script_results('run_finch_smoke_tests', f, [], True)
return 0


Expand All @@ -29,8 +33,10 @@ def main_compile_targets(args):


if __name__ == '__main__':
funcs = {
'run': main_run,
'compile_targets': main_compile_targets,
}
sys.exit(common.run_script(sys.argv[1:], funcs))
if 'compile_targets' in sys.argv:
funcs = {
'run': None,
'compile_targets': main_compile_targets,
}
sys.exit(common.run_script(sys.argv[1:], funcs))
sys.exit(main_run(sys.argv[1:]))

0 comments on commit 1c21521

Please sign in to comment.