| 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)
|
|
|