OLD | NEW |
1 # Copyright 2014 the V8 project authors. All rights reserved. | 1 # Copyright 2014 the V8 project authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 import os | 6 import os |
7 import shutil | 7 import shutil |
8 import sys | 8 import sys |
9 | 9 |
10 from testrunner.local import testsuite | 10 from testrunner.local import testsuite |
(...skipping 30 matching lines...) Expand all Loading... |
41 os.path.join(self.root, "harness-finish.js")]) | 41 os.path.join(self.root, "harness-finish.js")]) |
42 | 42 |
43 def GetSourceForTest(self, testcase): | 43 def GetSourceForTest(self, testcase): |
44 filename = os.path.join(self.testroot, testcase.path + ".js") | 44 filename = os.path.join(self.testroot, testcase.path + ".js") |
45 with open(filename) as f: | 45 with open(filename) as f: |
46 return f.read() | 46 return f.read() |
47 | 47 |
48 def IsNegativeTest(self, testcase): | 48 def IsNegativeTest(self, testcase): |
49 return False | 49 return False |
50 | 50 |
51 def IsFailureOutput(self, output, testpath): | 51 def IsFailureOutput(self, testcase): |
52 if output.exit_code != 0: | 52 if testcase.output.exit_code != 0: |
53 return True | 53 return True |
54 return "FAILED!" in output.stdout | 54 return "FAILED!" in testcase.output.stdout |
55 | 55 |
56 def DownloadData(self): | 56 def DownloadData(self): |
57 print "SimdJs download is deprecated. It's part of DEPS." | 57 print "SimdJs download is deprecated. It's part of DEPS." |
58 | 58 |
59 # Clean up old directories and archive files. | 59 # Clean up old directories and archive files. |
60 directory_old_name = os.path.join(self.root, "data.old") | 60 directory_old_name = os.path.join(self.root, "data.old") |
61 if os.path.exists(directory_old_name): | 61 if os.path.exists(directory_old_name): |
62 shutil.rmtree(directory_old_name) | 62 shutil.rmtree(directory_old_name) |
63 | 63 |
64 archive_files = [f for f in os.listdir(self.root) | 64 archive_files = [f for f in os.listdir(self.root) |
65 if f.startswith("ecmascript_simd-")] | 65 if f.startswith("ecmascript_simd-")] |
66 if len(archive_files) > 0: | 66 if len(archive_files) > 0: |
67 print "Clobber outdated test archives ..." | 67 print "Clobber outdated test archives ..." |
68 for f in archive_files: | 68 for f in archive_files: |
69 os.remove(os.path.join(self.root, f)) | 69 os.remove(os.path.join(self.root, f)) |
70 | 70 |
71 | 71 |
72 def GetSuite(name, root): | 72 def GetSuite(name, root): |
73 return SimdJsTestSuite(name, root) | 73 return SimdJsTestSuite(name, root) |
OLD | NEW |