diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/testing/scripts/run_wpt_tests.py | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/testing/scripts/run_wpt_tests.py')
-rwxr-xr-x | chromium/testing/scripts/run_wpt_tests.py | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/chromium/testing/scripts/run_wpt_tests.py b/chromium/testing/scripts/run_wpt_tests.py index 86ca893abf2..b777ba189b7 100755 --- a/chromium/testing/scripts/run_wpt_tests.py +++ b/chromium/testing/scripts/run_wpt_tests.py @@ -16,26 +16,16 @@ Here's the mapping [isolate script flag] : [wpt flag] import json import os -import shutil import sys import common +import wpt_common -BLINK_TOOLS_DIR = os.path.join(common.SRC_DIR, 'third_party', 'blink', 'tools') -WEB_TESTS_DIR = os.path.join(BLINK_TOOLS_DIR, os.pardir, 'web_tests') WPT_METADATA_DIR = "../../wpt_expectations_metadata/" WPT_OVERRIDE_EXPECTATIONS_PATH = ( "../../third_party/blink/web_tests/WPTOverrideExpectations") -class WPTTestAdapter(common.BaseIsolatedScriptArgsAdapter): - - def generate_test_output_args(self, output): - return ['--log-chromium', output] - - def generate_sharding_args(self, total_shards, shard_index): - return ['--total-chunks=%d' % total_shards, - # shard_index is 0-based but WPT's this-chunk to be 1-based - '--this-chunk=%d' % (shard_index + 1)] +class WPTTestAdapter(wpt_common.BaseWptScriptAdapter): @property def rest_args(self): @@ -88,33 +78,11 @@ class WPTTestAdapter(common.BaseIsolatedScriptArgsAdapter): ]) return rest_args - def do_post_test_run_tasks(self): - # Move json results into layout-test-results directory - results_dir = os.path.dirname(self.options.isolated_script_test_output) - layout_test_results = os.path.join(results_dir, 'layout-test-results') - if os.path.exists(layout_test_results): - shutil.rmtree(layout_test_results) - os.mkdir(layout_test_results) - shutil.copyfile(self.options.isolated_script_test_output, - os.path.join(layout_test_results, 'full_results.json')) - # create full_results_jsonp.js file which is used to - # load results into the results viewer - with open(self.options.isolated_script_test_output, 'r') \ - as full_results, \ - open(os.path.join( - layout_test_results, 'full_results_jsonp.js'), 'w') \ - as json_js: - json_js.write('ADD_FULL_RESULTS(%s);' % full_results.read()) - # copy layout test results viewer to layout-test-results directory - shutil.copyfile( - os.path.join(WEB_TESTS_DIR, 'fast', 'harness', 'results.html'), - os.path.join(layout_test_results, 'results.html')) - def main(): # First, generate WPT metadata files. common.run_command([ sys.executable, - os.path.join(BLINK_TOOLS_DIR, 'build_wpt_metadata.py'), + os.path.join(wpt_common.BLINK_TOOLS_DIR, 'build_wpt_metadata.py'), "--metadata-output-dir", WPT_METADATA_DIR, "--additional-expectations", |