Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: test/cctest/testcfg.py

Issue 10919265: First commit of new tools/run-tests.py (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: s/server.py/test-server.py/ in README Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/benchmarks/testcfg.py ('k') | test/es5conform/testcfg.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/testcfg.py
diff --git a/test/cctest/testcfg.py b/test/cctest/testcfg.py
index 532edfc26df37cf157f89be4c279fdedc02645ff..b67002f53acede5f51c49703f5911923b3281394 100644
--- a/test/cctest/testcfg.py
+++ b/test/cctest/testcfg.py
@@ -25,11 +25,66 @@
# (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 test
import os
-from os.path import join, dirname, exists
-import platform
-import utils
+import shutil
+
+from testrunner.local import commands
+from testrunner.local import testsuite
+from testrunner.local import utils
+from testrunner.objects import testcase
+
+
+class CcTestSuite(testsuite.TestSuite):
+
+ def __init__(self, name, root):
+ super(CcTestSuite, self).__init__(name, root)
+ self.serdes_dir = normpath(join(root, "..", "..", "out", ".serdes"))
+ if exists(self.serdes_dir):
+ shutil.rmtree(self.serdes_dir, True)
+ os.makedirs(self.serdes_dir)
+
+ def ListTests(self, context):
+ shell = join(context.shell_dir, self.shell())
+ if utils.IsWindows():
+ shell += '.exe'
+ output = commands.Execute([shell, '--list'])
+ if output.exit_code != 0:
+ print output.stdout
+ print output.stderr
+ return []
+ tests = []
+ for test_desc in output.stdout.strip().split():
+ raw_test, dependency = test_desc.split('<')
+ if dependency != '':
+ dependency = raw_test.split('/')[0] + '/' + dependency
+ else:
+ dependency = None
+ test = testcase.TestCase(self, raw_test, dependency=dependency)
+ tests.append(test)
+ tests.sort()
+ return tests
+
+ def GetFlagsForTestCase(self, testcase, context):
+ testname = testcase.path.split(os.path.sep)[-1]
+ serialization_file = join(self.serdes_dir, "serdes_" + testname)
+ serialization_file += ''.join(testcase.flags).replace('-', '_')
+ return (testcase.flags + [testcase.path] + context.mode_flags +
+ ["--testing_serialization_file=" + serialization_file])
+
+ def shell(self):
+ return "cctest"
+
+
+def GetSuite(name, root):
+ return CcTestSuite(name, root)
+
+
+# Deprecated definitions below.
+# TODO(jkummerow): Remove when SCons is no longer supported.
+
+
+from os.path import exists, join, normpath
+import test
class CcTestCase(test.TestCase):
« no previous file with comments | « test/benchmarks/testcfg.py ('k') | test/es5conform/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698