Commit a2a59723 authored by machenbach's avatar machenbach Committed by Commit bot

[test] Deprecate test data download for most test suites

This removes the test-download method for all but
promises-aplus. They all only contain legacy code for
deleting old archives.

Only test262 needs to prepare sources on swarming, which is
moved to a new method, called unconditionally.

All references to --download-data and --download-data-only
in the infrastructure can be removed after this.

BUG=

Review-Url: https://codereview.chromium.org/2227613002
Cr-Commit-Position: refs/heads/master@{#38439}
parent 76949ba4
......@@ -27,8 +27,6 @@
import os
import shutil
import subprocess
from testrunner.local import testsuite
from testrunner.objects import testcase
......@@ -112,21 +110,6 @@ class MozillaTestSuite(testsuite.TestSuite):
return True
return "FAILED!" in testcase.output.stdout
def DownloadData(self):
print "Mozilla download is deprecated. It's part of DEPS."
# Clean up old directories and archive files.
directory_old_name = os.path.join(self.root, "data.old")
if os.path.exists(directory_old_name):
shutil.rmtree(directory_old_name)
archive_files = [f for f in os.listdir(self.root)
if f.startswith("downloaded_")]
if len(archive_files) > 0:
print "Clobber outdated test archives ..."
for f in archive_files:
os.remove(os.path.join(self.root, f))
def GetSuite(name, root):
return MozillaTestSuite(name, root)
......@@ -4,7 +4,6 @@
import os
import shutil
import sys
from testrunner.local import testsuite
......@@ -53,21 +52,6 @@ class SimdJsTestSuite(testsuite.TestSuite):
return True
return "FAILED!" in testcase.output.stdout
def DownloadData(self):
print "SimdJs download is deprecated. It's part of DEPS."
# Clean up old directories and archive files.
directory_old_name = os.path.join(self.root, "data.old")
if os.path.exists(directory_old_name):
shutil.rmtree(directory_old_name)
archive_files = [f for f in os.listdir(self.root)
if f.startswith("ecmascript_simd-")]
if len(archive_files) > 0:
print "Clobber outdated test archives ..."
for f in archive_files:
os.remove(os.path.join(self.root, f))
def GetSuite(name, root):
return SimdJsTestSuite(name, root)
......@@ -26,10 +26,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import hashlib
import imp
import os
import shutil
import sys
import tarfile
......@@ -208,21 +206,7 @@ class Test262TestSuite(testsuite.TestSuite):
return outcome != statusfile.FAIL
return not outcome in (testcase.outcomes or [statusfile.PASS])
def DownloadData(self):
print "Test262 download is deprecated. It's part of DEPS."
# Clean up old directories and archive files.
directory_old_name = os.path.join(self.root, "data.old")
if os.path.exists(directory_old_name):
shutil.rmtree(directory_old_name)
archive_files = [f for f in os.listdir(self.root)
if f.startswith("tc39-test262-")]
if len(archive_files) > 0:
print "Clobber outdated test archives ..."
for f in archive_files:
os.remove(os.path.join(self.root, f))
def PrepareSources(self):
# The archive is created only on swarming. Local checkouts have the
# data folder.
if os.path.exists(ARCHIVE) and not os.path.exists(DATA):
......
......@@ -252,7 +252,7 @@ def BuildOptions():
result.add_option("--download-data", help="Download missing test suite data",
default=False, action="store_true")
result.add_option("--download-data-only",
help="Download missing test suite data and exit",
help="Deprecated",
default=False, action="store_true")
result.add_option("--extra-flags",
help="Additional flags to pass to each test command",
......@@ -667,6 +667,9 @@ def Main():
if options.download_data_only:
return exit_code
for s in suites:
s.PrepareSources()
for (arch, mode) in options.arch_and_mode:
try:
code = Execute(arch, mode, args, options, suites)
......
......@@ -125,6 +125,14 @@ class TestSuite(object):
"""
return self._VariantGeneratorFactory()(self, set(variants))
def PrepareSources(self):
"""Called once before multiprocessing for doing file-system operations.
This should not access the network. For network access use the method
below.
"""
pass
def DownloadData(self):
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment