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

Unified Diff: test/mksnapshot/testcfg.py

Issue 2567603002: [test] Add mksnapshot stress test suite
Patch Set: [test] Add mksnapshot stress test suite Created 4 years 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/mksnapshot/mksnapshot.status ('k') | tools/run-tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mksnapshot/testcfg.py
diff --git a/test/mksnapshot/testcfg.py b/test/mksnapshot/testcfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..9f07738e1c6d92075b8be09431deb60a932bb032
--- /dev/null
+++ b/test/mksnapshot/testcfg.py
@@ -0,0 +1,49 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import shutil
+import tempfile
+
+from testrunner.local import testsuite
+from testrunner.local import utils
+from testrunner.objects import testcase
+
+
+class MkSnapshotTestSuite(testsuite.TestSuite):
+
+ def Setup(self):
+ self.tmp_dir = tempfile.mkdtemp(prefix='tmp_mksnapshot_test_')
+
+ def TearDown(self):
+ shutil.rmtree(self.tmp_dir)
+
+ def ListTests(self, context):
+ return [
+ testcase.TestCase(
+ self,
+ 'Snapshot%03d' % i,
+ flags=[
+ '--random-seed=%d' % utils.RandomSeed(),
+ '--startup_src=%s' % os.path.join(
+ self.tmp_dir, 'snapshot%03d.cc' % i),
+ '--startup_blob=%s' % os.path.join(
+ self.tmp_dir, 'snapshot_blob%03d.bin' % i),
+ ],
+ )
+ for i in range(100)
+ ]
+
+ def GetFlagsForTestCase(self, testcase, context):
+ return testcase.flags + context.mode_flags
+
+ def shell(self):
+ return 'mksnapshot'
+
+ def _VariantGeneratorFactory(self):
+ return testsuite.StandardVariantGenerator
+
+
+def GetSuite(name, root):
+ return MkSnapshotTestSuite(name, root)
« no previous file with comments | « test/mksnapshot/mksnapshot.status ('k') | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698