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

Side by Side Diff: test/fuzz-natives/testcfg.py

Issue 663043003: Remove fuzz-natives tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/fuzz-natives/fuzz-natives.status ('k') | tools/run-tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import os
6
7 from testrunner.local import commands
8 from testrunner.local import testsuite
9 from testrunner.local import utils
10 from testrunner.objects import testcase
11
12 class FuzzNativesTestSuite(testsuite.TestSuite):
13
14 def __init__(self, name, root):
15 super(FuzzNativesTestSuite, self).__init__(name, root)
16
17 def ListTests(self, context):
18 shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
19 if utils.IsWindows():
20 shell += ".exe"
21 output = commands.Execute(
22 context.command_prefix +
23 [shell, "--allow-natives-syntax", "-e",
24 "try { var natives = %ListNatives();"
25 " for (var n in natives) { print(natives[n]); }"
26 "} catch(e) {}"] +
27 context.extra_flags)
28 if output.exit_code != 0:
29 print output.stdout
30 print output.stderr
31 assert False, "Failed to get natives list."
32 tests = []
33 for line in output.stdout.strip().split():
34 try:
35 (name, argc) = line.split(",")
36 flags = ["--allow-natives-syntax",
37 "-e", "var NAME = '%s', ARGC = %s;" % (name, argc)]
38 test = testcase.TestCase(self, name, flags)
39 tests.append(test)
40 except:
41 # Work-around: If parsing didn't work, it might have been due to output
42 # caused by other d8 flags.
43 pass
44 return tests
45
46 def GetFlagsForTestCase(self, testcase, context):
47 name = testcase.path
48 basefile = os.path.join(self.root, "base.js")
49 return testcase.flags + [basefile] + context.mode_flags
50
51 def GetSuite(name, root):
52 return FuzzNativesTestSuite(name, root)
OLDNEW
« no previous file with comments | « test/fuzz-natives/fuzz-natives.status ('k') | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698