haikuwebkit/Tools/Scripts/update-wasm-gcc-torture.py

153 lines
6.0 KiB
Python
Raw Permalink Normal View History

#! /usr/bin/env python
#
# Copyright (C) 2017 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import argparse
import glob
import json
import os.path
import shutil
import subprocess
import sys
import tarfile
if sys.version_info > (3, 0):
from urllib.request import urlopen
else:
from urllib2 import urlopen
LKGR_URL = 'https://storage.googleapis.com/wasm-llvm/builds/%s/lkgr.json'
TORTURE_FILE = 'wasm-torture-emwasm-%s.tbz2'
TORTURE_URL = 'https://storage.googleapis.com/wasm-llvm/builds/%s/%s/%s'
TORTURE_DIR = 'emwasm-torture-out'
WATERFALL_DIR = 'waterfall'
WATERFALL_GIT = 'https://github.com/WebAssembly/waterfall.git'
WATERFALL_KNOWN_FAILURES = 'src/test/run_known_gcc_test_failures.txt'
DESCRIPTION = """GCC torture test packager for jsc testing
Obtain the GCC torture tests as compiled for WebAssembly by the waterfall, using
Emscripten with its embedded libc. Create a yaml file which can be executed with
run-jsc-stress-tests."""
def parse_args():
parser = argparse.ArgumentParser(
description=DESCRIPTION,
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog='See http://wasm-stat.us for current waterfall status')
parser.add_argument('--lkgr', default=None, help='LKGR value to use')
parser.add_argument('--platform', default='mac', help='Waterfall platform to sync to')
parser.add_argument('--nountar', default=False, action='store_true', help='If set, torture tests are assumed to already be in their destination folder')
parser.add_argument('--waterfall_hash', default=None, help='git hash to use for the waterfall repo')
parser.add_argument('--yaml', default='gcc-torture.yaml', help='yaml test file to generate')
return parser.parse_args()
def update_lkgr(args):
lkgr_url = LKGR_URL % args.platform
if not args.lkgr:
[python] Replace print operator with print() function for python3 compatibility https://bugs.webkit.org/show_bug.cgi?id=180592 Reviewed by Michael Catanzaro. PerformanceTests: * JSBench/harness.py: Source/JavaScriptCore: * Scripts/generateYarrUnicodePropertyTables.py: (openOrExit): (verifyUCDFilesExist): (Aliases.parsePropertyAliasesFile): (Aliases.parsePropertyValueAliasesFile): * Scripts/make-js-file-arrays.py: (main): * generate-bytecode-files: Source/WebCore/PAL: * AVFoundationSupport.py: Tools: * BuildSlaveSupport/wait-for-SVN-server.py: (getLatestSVNRevision): (waitForSVNRevision): * Scripts/download-latest-github-release.py: (find_latest_release): (main): * Scripts/update-wasm-gcc-torture.py: (update_lkgr): (untar_torture): (list_js_files): (waterfall_known_failures): * Scripts/update-webkit-wincairo-libs.py: * Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.show_results): * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.fetch_result): * Scripts/webkitpy/benchmark_runner/run_benchmark.py: (list_benchmark_plans): * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_from_idl): (BindingsTests.generate_supplemental_dependency): (BindingsTests.detect_changes): (BindingsTests.run_tests): (BindingsTests.main): * Scripts/webkitpy/codegen/main.py: (BuiltinsGeneratorTests.generate_from_js_builtins): (BuiltinsGeneratorTests.detect_changes): (BuiltinsGeneratorTests.single_builtin_test): (BuiltinsGeneratorTests.run_test): (BuiltinsGeneratorTests.run_tests): (BuiltinsGeneratorTests.main): * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzilla.fetch_attachment): * Scripts/webkitpy/common/net/buildbot/buildbot.py: (Builder._fetch_revision_to_build_map): * Scripts/webkitpy/common/system/crashlogs.py: (CrashLogs._find_newest_log_win): * Scripts/webkitpy/common/system/outputcapture_unittest.py: (OutputCaptureTest.test_output_capture_scope): * Scripts/webkitpy/common/system/profiler.py: (GooglePProf.profile_after_exit): (Perf.profile_after_exit): * Scripts/webkitpy/common/system/user.py: (User.prompt_with_multiple_lists): (User.prompt_with_list): (User._warn_if_application_is_xcode): (User.edit_changelog): * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): (InspectorGeneratorTests.detect_changes): (InspectorGeneratorTests.run_tests): (InspectorGeneratorTests.main): * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._print_expectation_line_for_test): (Manager._print_expectations_for_subset): (Manager._print_expectations_for_subset.if): * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: (run_server): * Scripts/webkitpy/port/config_standalone.py: (main): * Scripts/webkitpy/port/darwin_testcase.py: (DarwinTest.test_spindump.logging_run_command): (DarwinTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios.py: (IOSPort.clean_up_test_run): * Scripts/webkitpy/port/ios_device_unittest.py: (IOSDeviceTest.test_spindump.logging_run_command): (IOSDeviceTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios_simulator_unittest.py: (IOSSimulatorTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/port/leakdetector_unittest.py: (test_count_total_bytes_and_unique_leaks.mock_run_script): * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/style/checkers/contributors.py: (ContributorsChecker.check): * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: (AbstractLocalServerCommand.execute): * Scripts/webkitpy/tool/commands/adduserstogroups.py: (AddUsersToGroups.execute): * Scripts/webkitpy/tool/commands/analyzechangelog.py: (AnalyzeChangeLog._generate_jsons): (AnalyzeChangeLog.execute): (ChangeLogAnalyzer._set_filename): (ChangeLogAnalyzer.analyze): * Scripts/webkitpy/tool/commands/bugfortest.py: (BugForTest.execute): * Scripts/webkitpy/tool/commands/bugsearch.py: (execute): * Scripts/webkitpy/tool/commands/findusers.py: (FindUsers.execute): * Scripts/webkitpy/tool/commands/gardenomatic.py: (GardenOMatic.execute): * Scripts/webkitpy/tool/commands/rebaseline.py: (RebaselineTest.execute): * Scripts/webkitpy/tool/commands/rebaselineserver.py: (RebaselineServer._prepare_config): * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): (SetupGitClone._get_username_and_email): * Scripts/webkitpy/tool/commands/suggestnominations.py: (SuggestNominations._print_nominations): (SuggestNominations._print_counts): * Scripts/webkitpy/tool/commands/upload.py: (CommitMessageForCurrentDiff.execute): (CreateBug.prompt_for_bug_title_and_comment): * Scripts/webkitpy/tool/multicommandtool.py: (HelpCommand.execute): * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: (TestGardeningHTTPRequestHandler._serve_text): (TestGardeningHTTPRequestHandler._serve_json): * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py: (AddSvnMimetypeForPng.run): * Scripts/webkitpy/tool/steps/suggestreviewers.py: (SuggestReviewers.run): * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.update_tests_options): * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.run): * TestResultServer/model/jsonresults_unittest.py: * gtk/ycm_extra_conf.py: (FlagsForFile): * lldb/lldb_webkit.py: (btjs): LayoutTests: * html5lib/generate-test-wrappers.py: (_remove_stale_tests): * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: (web_socket_do_extra_handshake): Canonical link: https://commits.webkit.org/196514@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 21:56:09 +00:00
print('Downloading: %s' % lkgr_url)
args.lkgr = json.loads(urlopen(lkgr_url).read())['build']
[python] Replace print operator with print() function for python3 compatibility https://bugs.webkit.org/show_bug.cgi?id=180592 Reviewed by Michael Catanzaro. PerformanceTests: * JSBench/harness.py: Source/JavaScriptCore: * Scripts/generateYarrUnicodePropertyTables.py: (openOrExit): (verifyUCDFilesExist): (Aliases.parsePropertyAliasesFile): (Aliases.parsePropertyValueAliasesFile): * Scripts/make-js-file-arrays.py: (main): * generate-bytecode-files: Source/WebCore/PAL: * AVFoundationSupport.py: Tools: * BuildSlaveSupport/wait-for-SVN-server.py: (getLatestSVNRevision): (waitForSVNRevision): * Scripts/download-latest-github-release.py: (find_latest_release): (main): * Scripts/update-wasm-gcc-torture.py: (update_lkgr): (untar_torture): (list_js_files): (waterfall_known_failures): * Scripts/update-webkit-wincairo-libs.py: * Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.show_results): * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.fetch_result): * Scripts/webkitpy/benchmark_runner/run_benchmark.py: (list_benchmark_plans): * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_from_idl): (BindingsTests.generate_supplemental_dependency): (BindingsTests.detect_changes): (BindingsTests.run_tests): (BindingsTests.main): * Scripts/webkitpy/codegen/main.py: (BuiltinsGeneratorTests.generate_from_js_builtins): (BuiltinsGeneratorTests.detect_changes): (BuiltinsGeneratorTests.single_builtin_test): (BuiltinsGeneratorTests.run_test): (BuiltinsGeneratorTests.run_tests): (BuiltinsGeneratorTests.main): * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzilla.fetch_attachment): * Scripts/webkitpy/common/net/buildbot/buildbot.py: (Builder._fetch_revision_to_build_map): * Scripts/webkitpy/common/system/crashlogs.py: (CrashLogs._find_newest_log_win): * Scripts/webkitpy/common/system/outputcapture_unittest.py: (OutputCaptureTest.test_output_capture_scope): * Scripts/webkitpy/common/system/profiler.py: (GooglePProf.profile_after_exit): (Perf.profile_after_exit): * Scripts/webkitpy/common/system/user.py: (User.prompt_with_multiple_lists): (User.prompt_with_list): (User._warn_if_application_is_xcode): (User.edit_changelog): * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): (InspectorGeneratorTests.detect_changes): (InspectorGeneratorTests.run_tests): (InspectorGeneratorTests.main): * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._print_expectation_line_for_test): (Manager._print_expectations_for_subset): (Manager._print_expectations_for_subset.if): * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: (run_server): * Scripts/webkitpy/port/config_standalone.py: (main): * Scripts/webkitpy/port/darwin_testcase.py: (DarwinTest.test_spindump.logging_run_command): (DarwinTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios.py: (IOSPort.clean_up_test_run): * Scripts/webkitpy/port/ios_device_unittest.py: (IOSDeviceTest.test_spindump.logging_run_command): (IOSDeviceTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios_simulator_unittest.py: (IOSSimulatorTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/port/leakdetector_unittest.py: (test_count_total_bytes_and_unique_leaks.mock_run_script): * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/style/checkers/contributors.py: (ContributorsChecker.check): * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: (AbstractLocalServerCommand.execute): * Scripts/webkitpy/tool/commands/adduserstogroups.py: (AddUsersToGroups.execute): * Scripts/webkitpy/tool/commands/analyzechangelog.py: (AnalyzeChangeLog._generate_jsons): (AnalyzeChangeLog.execute): (ChangeLogAnalyzer._set_filename): (ChangeLogAnalyzer.analyze): * Scripts/webkitpy/tool/commands/bugfortest.py: (BugForTest.execute): * Scripts/webkitpy/tool/commands/bugsearch.py: (execute): * Scripts/webkitpy/tool/commands/findusers.py: (FindUsers.execute): * Scripts/webkitpy/tool/commands/gardenomatic.py: (GardenOMatic.execute): * Scripts/webkitpy/tool/commands/rebaseline.py: (RebaselineTest.execute): * Scripts/webkitpy/tool/commands/rebaselineserver.py: (RebaselineServer._prepare_config): * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): (SetupGitClone._get_username_and_email): * Scripts/webkitpy/tool/commands/suggestnominations.py: (SuggestNominations._print_nominations): (SuggestNominations._print_counts): * Scripts/webkitpy/tool/commands/upload.py: (CommitMessageForCurrentDiff.execute): (CreateBug.prompt_for_bug_title_and_comment): * Scripts/webkitpy/tool/multicommandtool.py: (HelpCommand.execute): * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: (TestGardeningHTTPRequestHandler._serve_text): (TestGardeningHTTPRequestHandler._serve_json): * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py: (AddSvnMimetypeForPng.run): * Scripts/webkitpy/tool/steps/suggestreviewers.py: (SuggestReviewers.run): * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.update_tests_options): * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.run): * TestResultServer/model/jsonresults_unittest.py: * gtk/ycm_extra_conf.py: (FlagsForFile): * lldb/lldb_webkit.py: (btjs): LayoutTests: * html5lib/generate-test-wrappers.py: (_remove_stale_tests): * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: (web_socket_do_extra_handshake): Canonical link: https://commits.webkit.org/196514@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 21:56:09 +00:00
print('lkgr: %s' % args.lkgr)
def untar_torture(args):
torture_file = TORTURE_FILE % args.lkgr
torture_url = TORTURE_URL % (args.platform, args.lkgr, torture_file)
if not os.path.exists(torture_file):
[python] Replace print operator with print() function for python3 compatibility https://bugs.webkit.org/show_bug.cgi?id=180592 Reviewed by Michael Catanzaro. PerformanceTests: * JSBench/harness.py: Source/JavaScriptCore: * Scripts/generateYarrUnicodePropertyTables.py: (openOrExit): (verifyUCDFilesExist): (Aliases.parsePropertyAliasesFile): (Aliases.parsePropertyValueAliasesFile): * Scripts/make-js-file-arrays.py: (main): * generate-bytecode-files: Source/WebCore/PAL: * AVFoundationSupport.py: Tools: * BuildSlaveSupport/wait-for-SVN-server.py: (getLatestSVNRevision): (waitForSVNRevision): * Scripts/download-latest-github-release.py: (find_latest_release): (main): * Scripts/update-wasm-gcc-torture.py: (update_lkgr): (untar_torture): (list_js_files): (waterfall_known_failures): * Scripts/update-webkit-wincairo-libs.py: * Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.show_results): * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.fetch_result): * Scripts/webkitpy/benchmark_runner/run_benchmark.py: (list_benchmark_plans): * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_from_idl): (BindingsTests.generate_supplemental_dependency): (BindingsTests.detect_changes): (BindingsTests.run_tests): (BindingsTests.main): * Scripts/webkitpy/codegen/main.py: (BuiltinsGeneratorTests.generate_from_js_builtins): (BuiltinsGeneratorTests.detect_changes): (BuiltinsGeneratorTests.single_builtin_test): (BuiltinsGeneratorTests.run_test): (BuiltinsGeneratorTests.run_tests): (BuiltinsGeneratorTests.main): * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzilla.fetch_attachment): * Scripts/webkitpy/common/net/buildbot/buildbot.py: (Builder._fetch_revision_to_build_map): * Scripts/webkitpy/common/system/crashlogs.py: (CrashLogs._find_newest_log_win): * Scripts/webkitpy/common/system/outputcapture_unittest.py: (OutputCaptureTest.test_output_capture_scope): * Scripts/webkitpy/common/system/profiler.py: (GooglePProf.profile_after_exit): (Perf.profile_after_exit): * Scripts/webkitpy/common/system/user.py: (User.prompt_with_multiple_lists): (User.prompt_with_list): (User._warn_if_application_is_xcode): (User.edit_changelog): * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): (InspectorGeneratorTests.detect_changes): (InspectorGeneratorTests.run_tests): (InspectorGeneratorTests.main): * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._print_expectation_line_for_test): (Manager._print_expectations_for_subset): (Manager._print_expectations_for_subset.if): * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: (run_server): * Scripts/webkitpy/port/config_standalone.py: (main): * Scripts/webkitpy/port/darwin_testcase.py: (DarwinTest.test_spindump.logging_run_command): (DarwinTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios.py: (IOSPort.clean_up_test_run): * Scripts/webkitpy/port/ios_device_unittest.py: (IOSDeviceTest.test_spindump.logging_run_command): (IOSDeviceTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios_simulator_unittest.py: (IOSSimulatorTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/port/leakdetector_unittest.py: (test_count_total_bytes_and_unique_leaks.mock_run_script): * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/style/checkers/contributors.py: (ContributorsChecker.check): * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: (AbstractLocalServerCommand.execute): * Scripts/webkitpy/tool/commands/adduserstogroups.py: (AddUsersToGroups.execute): * Scripts/webkitpy/tool/commands/analyzechangelog.py: (AnalyzeChangeLog._generate_jsons): (AnalyzeChangeLog.execute): (ChangeLogAnalyzer._set_filename): (ChangeLogAnalyzer.analyze): * Scripts/webkitpy/tool/commands/bugfortest.py: (BugForTest.execute): * Scripts/webkitpy/tool/commands/bugsearch.py: (execute): * Scripts/webkitpy/tool/commands/findusers.py: (FindUsers.execute): * Scripts/webkitpy/tool/commands/gardenomatic.py: (GardenOMatic.execute): * Scripts/webkitpy/tool/commands/rebaseline.py: (RebaselineTest.execute): * Scripts/webkitpy/tool/commands/rebaselineserver.py: (RebaselineServer._prepare_config): * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): (SetupGitClone._get_username_and_email): * Scripts/webkitpy/tool/commands/suggestnominations.py: (SuggestNominations._print_nominations): (SuggestNominations._print_counts): * Scripts/webkitpy/tool/commands/upload.py: (CommitMessageForCurrentDiff.execute): (CreateBug.prompt_for_bug_title_and_comment): * Scripts/webkitpy/tool/multicommandtool.py: (HelpCommand.execute): * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: (TestGardeningHTTPRequestHandler._serve_text): (TestGardeningHTTPRequestHandler._serve_json): * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py: (AddSvnMimetypeForPng.run): * Scripts/webkitpy/tool/steps/suggestreviewers.py: (SuggestReviewers.run): * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.update_tests_options): * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.run): * TestResultServer/model/jsonresults_unittest.py: * gtk/ycm_extra_conf.py: (FlagsForFile): * lldb/lldb_webkit.py: (btjs): LayoutTests: * html5lib/generate-test-wrappers.py: (_remove_stale_tests): * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: (web_socket_do_extra_handshake): Canonical link: https://commits.webkit.org/196514@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 21:56:09 +00:00
print('Downloading: %s' % torture_url)
torture_download = urlopen(torture_url)
with open(torture_file, 'wb') as f:
f.write(torture_download.read())
if not args.nountar:
if os.path.isdir(TORTURE_DIR):
shutil.rmtree(TORTURE_DIR)
with tarfile.open(torture_file, 'r') as torture_tar:
[python] Replace print operator with print() function for python3 compatibility https://bugs.webkit.org/show_bug.cgi?id=180592 Reviewed by Michael Catanzaro. PerformanceTests: * JSBench/harness.py: Source/JavaScriptCore: * Scripts/generateYarrUnicodePropertyTables.py: (openOrExit): (verifyUCDFilesExist): (Aliases.parsePropertyAliasesFile): (Aliases.parsePropertyValueAliasesFile): * Scripts/make-js-file-arrays.py: (main): * generate-bytecode-files: Source/WebCore/PAL: * AVFoundationSupport.py: Tools: * BuildSlaveSupport/wait-for-SVN-server.py: (getLatestSVNRevision): (waitForSVNRevision): * Scripts/download-latest-github-release.py: (find_latest_release): (main): * Scripts/update-wasm-gcc-torture.py: (update_lkgr): (untar_torture): (list_js_files): (waterfall_known_failures): * Scripts/update-webkit-wincairo-libs.py: * Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.show_results): * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.fetch_result): * Scripts/webkitpy/benchmark_runner/run_benchmark.py: (list_benchmark_plans): * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_from_idl): (BindingsTests.generate_supplemental_dependency): (BindingsTests.detect_changes): (BindingsTests.run_tests): (BindingsTests.main): * Scripts/webkitpy/codegen/main.py: (BuiltinsGeneratorTests.generate_from_js_builtins): (BuiltinsGeneratorTests.detect_changes): (BuiltinsGeneratorTests.single_builtin_test): (BuiltinsGeneratorTests.run_test): (BuiltinsGeneratorTests.run_tests): (BuiltinsGeneratorTests.main): * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzilla.fetch_attachment): * Scripts/webkitpy/common/net/buildbot/buildbot.py: (Builder._fetch_revision_to_build_map): * Scripts/webkitpy/common/system/crashlogs.py: (CrashLogs._find_newest_log_win): * Scripts/webkitpy/common/system/outputcapture_unittest.py: (OutputCaptureTest.test_output_capture_scope): * Scripts/webkitpy/common/system/profiler.py: (GooglePProf.profile_after_exit): (Perf.profile_after_exit): * Scripts/webkitpy/common/system/user.py: (User.prompt_with_multiple_lists): (User.prompt_with_list): (User._warn_if_application_is_xcode): (User.edit_changelog): * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): (InspectorGeneratorTests.detect_changes): (InspectorGeneratorTests.run_tests): (InspectorGeneratorTests.main): * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._print_expectation_line_for_test): (Manager._print_expectations_for_subset): (Manager._print_expectations_for_subset.if): * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: (run_server): * Scripts/webkitpy/port/config_standalone.py: (main): * Scripts/webkitpy/port/darwin_testcase.py: (DarwinTest.test_spindump.logging_run_command): (DarwinTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios.py: (IOSPort.clean_up_test_run): * Scripts/webkitpy/port/ios_device_unittest.py: (IOSDeviceTest.test_spindump.logging_run_command): (IOSDeviceTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios_simulator_unittest.py: (IOSSimulatorTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/port/leakdetector_unittest.py: (test_count_total_bytes_and_unique_leaks.mock_run_script): * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/style/checkers/contributors.py: (ContributorsChecker.check): * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: (AbstractLocalServerCommand.execute): * Scripts/webkitpy/tool/commands/adduserstogroups.py: (AddUsersToGroups.execute): * Scripts/webkitpy/tool/commands/analyzechangelog.py: (AnalyzeChangeLog._generate_jsons): (AnalyzeChangeLog.execute): (ChangeLogAnalyzer._set_filename): (ChangeLogAnalyzer.analyze): * Scripts/webkitpy/tool/commands/bugfortest.py: (BugForTest.execute): * Scripts/webkitpy/tool/commands/bugsearch.py: (execute): * Scripts/webkitpy/tool/commands/findusers.py: (FindUsers.execute): * Scripts/webkitpy/tool/commands/gardenomatic.py: (GardenOMatic.execute): * Scripts/webkitpy/tool/commands/rebaseline.py: (RebaselineTest.execute): * Scripts/webkitpy/tool/commands/rebaselineserver.py: (RebaselineServer._prepare_config): * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): (SetupGitClone._get_username_and_email): * Scripts/webkitpy/tool/commands/suggestnominations.py: (SuggestNominations._print_nominations): (SuggestNominations._print_counts): * Scripts/webkitpy/tool/commands/upload.py: (CommitMessageForCurrentDiff.execute): (CreateBug.prompt_for_bug_title_and_comment): * Scripts/webkitpy/tool/multicommandtool.py: (HelpCommand.execute): * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: (TestGardeningHTTPRequestHandler._serve_text): (TestGardeningHTTPRequestHandler._serve_json): * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py: (AddSvnMimetypeForPng.run): * Scripts/webkitpy/tool/steps/suggestreviewers.py: (SuggestReviewers.run): * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.update_tests_options): * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.run): * TestResultServer/model/jsonresults_unittest.py: * gtk/ycm_extra_conf.py: (FlagsForFile): * lldb/lldb_webkit.py: (btjs): LayoutTests: * html5lib/generate-test-wrappers.py: (_remove_stale_tests): * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: (web_socket_do_extra_handshake): Canonical link: https://commits.webkit.org/196514@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 21:56:09 +00:00
print('Extracting: %s -> %s' % (torture_file, TORTURE_DIR))
torture_tar.extractall()
assert os.path.isdir(TORTURE_DIR)
def list_js_files(args):
js_files = sorted([os.path.basename(f) for f in glob.glob(os.path.join(TORTURE_DIR, '*.js'))])
[python] Replace print operator with print() function for python3 compatibility https://bugs.webkit.org/show_bug.cgi?id=180592 Reviewed by Michael Catanzaro. PerformanceTests: * JSBench/harness.py: Source/JavaScriptCore: * Scripts/generateYarrUnicodePropertyTables.py: (openOrExit): (verifyUCDFilesExist): (Aliases.parsePropertyAliasesFile): (Aliases.parsePropertyValueAliasesFile): * Scripts/make-js-file-arrays.py: (main): * generate-bytecode-files: Source/WebCore/PAL: * AVFoundationSupport.py: Tools: * BuildSlaveSupport/wait-for-SVN-server.py: (getLatestSVNRevision): (waitForSVNRevision): * Scripts/download-latest-github-release.py: (find_latest_release): (main): * Scripts/update-wasm-gcc-torture.py: (update_lkgr): (untar_torture): (list_js_files): (waterfall_known_failures): * Scripts/update-webkit-wincairo-libs.py: * Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.show_results): * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.fetch_result): * Scripts/webkitpy/benchmark_runner/run_benchmark.py: (list_benchmark_plans): * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_from_idl): (BindingsTests.generate_supplemental_dependency): (BindingsTests.detect_changes): (BindingsTests.run_tests): (BindingsTests.main): * Scripts/webkitpy/codegen/main.py: (BuiltinsGeneratorTests.generate_from_js_builtins): (BuiltinsGeneratorTests.detect_changes): (BuiltinsGeneratorTests.single_builtin_test): (BuiltinsGeneratorTests.run_test): (BuiltinsGeneratorTests.run_tests): (BuiltinsGeneratorTests.main): * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzilla.fetch_attachment): * Scripts/webkitpy/common/net/buildbot/buildbot.py: (Builder._fetch_revision_to_build_map): * Scripts/webkitpy/common/system/crashlogs.py: (CrashLogs._find_newest_log_win): * Scripts/webkitpy/common/system/outputcapture_unittest.py: (OutputCaptureTest.test_output_capture_scope): * Scripts/webkitpy/common/system/profiler.py: (GooglePProf.profile_after_exit): (Perf.profile_after_exit): * Scripts/webkitpy/common/system/user.py: (User.prompt_with_multiple_lists): (User.prompt_with_list): (User._warn_if_application_is_xcode): (User.edit_changelog): * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): (InspectorGeneratorTests.detect_changes): (InspectorGeneratorTests.run_tests): (InspectorGeneratorTests.main): * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._print_expectation_line_for_test): (Manager._print_expectations_for_subset): (Manager._print_expectations_for_subset.if): * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: (run_server): * Scripts/webkitpy/port/config_standalone.py: (main): * Scripts/webkitpy/port/darwin_testcase.py: (DarwinTest.test_spindump.logging_run_command): (DarwinTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios.py: (IOSPort.clean_up_test_run): * Scripts/webkitpy/port/ios_device_unittest.py: (IOSDeviceTest.test_spindump.logging_run_command): (IOSDeviceTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios_simulator_unittest.py: (IOSSimulatorTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/port/leakdetector_unittest.py: (test_count_total_bytes_and_unique_leaks.mock_run_script): * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/style/checkers/contributors.py: (ContributorsChecker.check): * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: (AbstractLocalServerCommand.execute): * Scripts/webkitpy/tool/commands/adduserstogroups.py: (AddUsersToGroups.execute): * Scripts/webkitpy/tool/commands/analyzechangelog.py: (AnalyzeChangeLog._generate_jsons): (AnalyzeChangeLog.execute): (ChangeLogAnalyzer._set_filename): (ChangeLogAnalyzer.analyze): * Scripts/webkitpy/tool/commands/bugfortest.py: (BugForTest.execute): * Scripts/webkitpy/tool/commands/bugsearch.py: (execute): * Scripts/webkitpy/tool/commands/findusers.py: (FindUsers.execute): * Scripts/webkitpy/tool/commands/gardenomatic.py: (GardenOMatic.execute): * Scripts/webkitpy/tool/commands/rebaseline.py: (RebaselineTest.execute): * Scripts/webkitpy/tool/commands/rebaselineserver.py: (RebaselineServer._prepare_config): * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): (SetupGitClone._get_username_and_email): * Scripts/webkitpy/tool/commands/suggestnominations.py: (SuggestNominations._print_nominations): (SuggestNominations._print_counts): * Scripts/webkitpy/tool/commands/upload.py: (CommitMessageForCurrentDiff.execute): (CreateBug.prompt_for_bug_title_and_comment): * Scripts/webkitpy/tool/multicommandtool.py: (HelpCommand.execute): * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: (TestGardeningHTTPRequestHandler._serve_text): (TestGardeningHTTPRequestHandler._serve_json): * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py: (AddSvnMimetypeForPng.run): * Scripts/webkitpy/tool/steps/suggestreviewers.py: (SuggestReviewers.run): * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.update_tests_options): * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.run): * TestResultServer/model/jsonresults_unittest.py: * gtk/ycm_extra_conf.py: (FlagsForFile): * lldb/lldb_webkit.py: (btjs): LayoutTests: * html5lib/generate-test-wrappers.py: (_remove_stale_tests): * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: (web_socket_do_extra_handshake): Canonical link: https://commits.webkit.org/196514@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 21:56:09 +00:00
print('Found %s JavaScript tests' % len(js_files))
assert len(js_files) > 1200
return js_files
def waterfall_known_failures(args):
if not os.path.isdir(WATERFALL_DIR):
subprocess.check_call(['git', 'clone', WATERFALL_GIT, WATERFALL_DIR])
else:
subprocess.check_call(['git', 'pull'], cwd=WATERFALL_DIR)
if args.waterfall_hash:
subprocess.check_call(['git', 'checkout', args.waterfall_hash], cwd=WATERFALL_DIR)
else:
args.waterfall_hash = subprocess.check_output(['git', 'log', '-n1', '--pretty=format:%H'], cwd=WATERFALL_DIR).strip()
[python] Replace print operator with print() function for python3 compatibility https://bugs.webkit.org/show_bug.cgi?id=180592 Reviewed by Michael Catanzaro. PerformanceTests: * JSBench/harness.py: Source/JavaScriptCore: * Scripts/generateYarrUnicodePropertyTables.py: (openOrExit): (verifyUCDFilesExist): (Aliases.parsePropertyAliasesFile): (Aliases.parsePropertyValueAliasesFile): * Scripts/make-js-file-arrays.py: (main): * generate-bytecode-files: Source/WebCore/PAL: * AVFoundationSupport.py: Tools: * BuildSlaveSupport/wait-for-SVN-server.py: (getLatestSVNRevision): (waitForSVNRevision): * Scripts/download-latest-github-release.py: (find_latest_release): (main): * Scripts/update-wasm-gcc-torture.py: (update_lkgr): (untar_torture): (list_js_files): (waterfall_known_failures): * Scripts/update-webkit-wincairo-libs.py: * Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.show_results): * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: (SimpleHTTPServerDriver.fetch_result): * Scripts/webkitpy/benchmark_runner/run_benchmark.py: (list_benchmark_plans): * Scripts/webkitpy/bindings/main.py: (BindingsTests.generate_from_idl): (BindingsTests.generate_supplemental_dependency): (BindingsTests.detect_changes): (BindingsTests.run_tests): (BindingsTests.main): * Scripts/webkitpy/codegen/main.py: (BuiltinsGeneratorTests.generate_from_js_builtins): (BuiltinsGeneratorTests.detect_changes): (BuiltinsGeneratorTests.single_builtin_test): (BuiltinsGeneratorTests.run_test): (BuiltinsGeneratorTests.run_tests): (BuiltinsGeneratorTests.main): * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzilla.fetch_attachment): * Scripts/webkitpy/common/net/buildbot/buildbot.py: (Builder._fetch_revision_to_build_map): * Scripts/webkitpy/common/system/crashlogs.py: (CrashLogs._find_newest_log_win): * Scripts/webkitpy/common/system/outputcapture_unittest.py: (OutputCaptureTest.test_output_capture_scope): * Scripts/webkitpy/common/system/profiler.py: (GooglePProf.profile_after_exit): (Perf.profile_after_exit): * Scripts/webkitpy/common/system/user.py: (User.prompt_with_multiple_lists): (User.prompt_with_list): (User._warn_if_application_is_xcode): (User.edit_changelog): * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): (InspectorGeneratorTests.detect_changes): (InspectorGeneratorTests.run_tests): (InspectorGeneratorTests.main): * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._print_expectation_line_for_test): (Manager._print_expectations_for_subset): (Manager._print_expectations_for_subset.if): * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: (run_server): * Scripts/webkitpy/port/config_standalone.py: (main): * Scripts/webkitpy/port/darwin_testcase.py: (DarwinTest.test_spindump.logging_run_command): (DarwinTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios.py: (IOSPort.clean_up_test_run): * Scripts/webkitpy/port/ios_device_unittest.py: (IOSDeviceTest.test_spindump.logging_run_command): (IOSDeviceTest.test_sample_process.logging_run_command): * Scripts/webkitpy/port/ios_simulator_unittest.py: (IOSSimulatorTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/port/leakdetector_unittest.py: (test_count_total_bytes_and_unique_leaks.mock_run_script): * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_xcrun.throwing_run_command): * Scripts/webkitpy/style/checkers/contributors.py: (ContributorsChecker.check): * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: (AbstractLocalServerCommand.execute): * Scripts/webkitpy/tool/commands/adduserstogroups.py: (AddUsersToGroups.execute): * Scripts/webkitpy/tool/commands/analyzechangelog.py: (AnalyzeChangeLog._generate_jsons): (AnalyzeChangeLog.execute): (ChangeLogAnalyzer._set_filename): (ChangeLogAnalyzer.analyze): * Scripts/webkitpy/tool/commands/bugfortest.py: (BugForTest.execute): * Scripts/webkitpy/tool/commands/bugsearch.py: (execute): * Scripts/webkitpy/tool/commands/findusers.py: (FindUsers.execute): * Scripts/webkitpy/tool/commands/gardenomatic.py: (GardenOMatic.execute): * Scripts/webkitpy/tool/commands/rebaseline.py: (RebaselineTest.execute): * Scripts/webkitpy/tool/commands/rebaselineserver.py: (RebaselineServer._prepare_config): * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): (SetupGitClone._get_username_and_email): * Scripts/webkitpy/tool/commands/suggestnominations.py: (SuggestNominations._print_nominations): (SuggestNominations._print_counts): * Scripts/webkitpy/tool/commands/upload.py: (CommitMessageForCurrentDiff.execute): (CreateBug.prompt_for_bug_title_and_comment): * Scripts/webkitpy/tool/multicommandtool.py: (HelpCommand.execute): * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: (TestGardeningHTTPRequestHandler._serve_text): (TestGardeningHTTPRequestHandler._serve_json): * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py: (AddSvnMimetypeForPng.run): * Scripts/webkitpy/tool/steps/suggestreviewers.py: (SuggestReviewers.run): * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.update_tests_options): * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.run): * TestResultServer/model/jsonresults_unittest.py: * gtk/ycm_extra_conf.py: (FlagsForFile): * lldb/lldb_webkit.py: (btjs): LayoutTests: * html5lib/generate-test-wrappers.py: (_remove_stale_tests): * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: (web_socket_do_extra_handshake): * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: (web_socket_do_extra_handshake): Canonical link: https://commits.webkit.org/196514@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 21:56:09 +00:00
print('Waterfall at: %s' % args.waterfall_hash)
known_failures = []
with open(os.path.join(WATERFALL_DIR, WATERFALL_KNOWN_FAILURES)) as failures_file:
for line in failures_file:
line = line.strip()
if '#' in line:
line = line[:line.index('#')].strip()
tokens = line.split()
if not tokens:
continue
test_file = tokens[0]
if len(tokens) > 1:
attributes = set(tokens[1].split(','))
if 'emwasm' not in attributes:
continue
if os.path.splitext(test_file)[-1] != '.js':
continue
known_failures.append(test_file)
assert known_failures
return set(known_failures)
def create_yaml(args, js_files, known_failures):
with open(args.yaml, 'w+') as yaml:
yaml.write('# GCC torture tests\n')
yaml.write('# Auto-generated by: %s\n' % sys.argv[0])
yaml.write('# lkgr: %s\n' % args.lkgr)
yaml.write('# Waterfall hash: %s\n' % args.waterfall_hash)
for js in js_files:
yaml.write('\n- path: %s/%s\n' % (TORTURE_DIR, js))
yaml.write(' cmd: runWebAssemblyEmscripten :%s\n' % ('normal' if js not in known_failures else 'skip'))
def main():
args = parse_args()
update_lkgr(args)
untar_torture(args)
js_files = list_js_files(args)
known_failures = waterfall_known_failures(args)
create_yaml(args, js_files, known_failures)
if __name__ == '__main__':
sys.exit(main())