Index: scripts/master/factory/v8_commands.py |
=================================================================== |
--- scripts/master/factory/v8_commands.py (revision 63686) |
+++ scripts/master/factory/v8_commands.py (working copy) |
@@ -17,14 +17,14 @@ |
"""Encapsulates methods to add v8 commands to a buildbot factory.""" |
def __init__(self, factory=None, identifier=None, target=None, |
- build_dir=None, target_platform=None): |
+ build_dir=None, target_platform=None, target_arch=None): |
commands.FactoryCommands.__init__(self, factory, identifier, |
target, build_dir, target_platform) |
- # override _script_dir - one below because we run our build inside |
- # the bleeding_edge directory |
- self._script_dir = self.PathJoin('..', self._script_dir) |
+ # Override _script_dir - one below because we run our build inside |
+ # the bleeding_edge directory. |
+ self._script_dir = self.PathJoin('..', self._script_dir); |
# Where to point waterfall links for builds and test results. |
self._archive_url = config.Master.archive_url |
@@ -36,6 +36,9 @@ |
self._es5conform_dir = self.PathJoin('bleeding_edge/test/es5conform/data') |
self._es5conform_url = config.Master.es5conform_root_url |
self._es5conform_revision = config.Master.es5conform_revision |
+ self._arch = None; |
+ if target_arch: |
+ self._arch = target_arch; |
if self._target_platform == 'win32': |
# Override to use the right python |
@@ -44,53 +47,76 @@ |
# Create smaller name for the functions and vars to siplify the code below. |
J = self.PathJoin |
+ |
s_dir = self._v8_script_dir |
- |
+ p_dir = self._private_script_dir |
+ self._archive_tool = J(s_dir, 'archive_v8.py') |
self._v8_test_tool = J(self._build_dir, 'tools') |
# Scripts in the v8 scripts dir. |
self._v8testing_tool = J(s_dir, 'v8testing.py') |
- self._v8_es5conform_tool = J(s_dir, 'v8_es5conform.py') |
- def AddV8Testing(self, properties=None): |
+ |
+ def AddV8Testing(self, properties=None, simulator=None, testname=None): |
+ if (self._target_platform == 'win32'): |
+ self.AddTaskkillStep(); |
cmd = [self._python, self._v8testing_tool, |
'--target', self._target] |
- if (self._target_platform == 'win32'): |
- self.AddTaskkillStep() |
+ if (testname): |
+ cmd += ['--testname', testname] |
+ if (simulator): |
+ cmd += ['--simulator', simulator] |
+ if (self._arch): |
+ cmd += ['--arch', self._arch] |
self.AddTestStep(shell.ShellCommand, |
'Check', cmd, |
workdir='build/bleeding_edge/') |
- def AddV8ES5Conform(self, properties=None): |
+ def AddV8ES5Conform(self, properties=None, simulator=None): |
cmd = [self._python, self._v8testing_tool, |
'--target', self._target, |
'--testname', 'es5conform'] |
if (self._target_platform == 'win32'): |
- self.AddTaskkillStep() |
+ self.AddTaskkillStep(); |
nsylvain
2010/10/25 20:24:49
no ";"
|
+ if (self._arch): |
+ cmd += ['--arch', self._arch] |
+ if (simulator): |
+ cmd += ['--simulator', simulator] |
self.AddTestStep(shell.ShellCommand, |
'ES5-Conform', |
cmd, |
workdir='build/bleeding_edge/') |
- def AddV8Mozilla(self, properties=None): |
+ def AddV8Mozilla(self, properties=None, simulator=None): |
cmd = [self._python, self._v8testing_tool, |
'--target', self._target, |
- '--build-dir', self._build_dir, |
'--testname', 'mozilla'] |
- |
+ if (self._target_platform == 'win32'): |
+ self.AddTaskkillStep(); |
+ if (self._arch): |
+ cmd += ['--arch', self._arch] |
+ if (simulator): |
+ cmd += ['--simulator', simulator] |
self.AddTestStep(shell.ShellCommand, 'Mozilla', cmd, |
workdir='build/bleeding_edge/') |
- def AddV8Sputnik(self, properties=None): |
+ def AddV8Sputnik(self, properties=None, simulator=None): |
cmd = [self._python, self._v8testing_tool, |
'--target', self._target, |
'--testname', 'sputnik'] |
if (self._target_platform == 'win32'): |
- self.AddTaskkillStep() |
+ self.AddTaskkillStep(); |
nsylvain
2010/10/25 20:24:49
no ";"
|
+ if (self._arch): |
+ cmd += ['--arch', self._arch] |
+ if (simulator): |
+ cmd += ['--simulator', simulator] |
self.AddTestStep(shell.ShellCommand, 'Sputnik', cmd, |
workdir='build/bleeding_edge/') |
- def AddArmSimTest(self, properties=None): |
+ def AddrAmSimTest(self, properties=None): |
+ self.AddV8Sputnik(simulator='arm') |
+ self.AddV8ES5Conform(simulator='arm') |
+ self.AddV8Mozilla(simulator='arm') |
cmd = [self._python, self._v8testing_tool, |
'--target', self._target, |
'--build-dir', self._build_dir, |
@@ -103,3 +129,46 @@ |
'--testname', 'presubmit'] |
self.AddTestStep(shell.ShellCommand, 'Presubmit', cmd, |
workdir='build/bleeding_edge/') |
+ |
+ def AddFuzzer(self, properties=None): |
+ cmd = ['./fuzz-v8.sh'] |
+ self.AddTestStep(shell.ShellCommand, 'Fuzz', cmd, |
+ workdir='build/bleeding_edge/') |
+ |
+ def AddLeakTests(self, properties=None): |
+ cmd = [self._python, self._v8testing_tool, |
+ '--testname', 'leak'] |
+ env = { |
+ 'PATH': ( |
+ self.build_dir + '../src/third_party/valgrind/linux_x86/bin;' |
+ ), |
+ 'VALGRIND_LIB': ( |
+ self.build_dir + '../src/third_party/valgrind/linux_x86/lib/valgrind' |
+ ), |
+ } |
+ self.AddTestStep(shell.ShellCommand, 'leak', cmd, |
+ env=env, |
+ workdir='build/bleeding_edge/') |
+ |
+ def AddArchiveBuild(self, mode='dev', show_url=True, extra_archive_paths=None): |
nsylvain
2010/10/25 20:24:49
80 chars
|
+ """Adds a step to the factory to archive a build.""" |
+ if show_url: |
+ url = '%s/%s/%s' % (self._archive_url, 'snapshots', self._identifier) |
+ text = 'download' |
+ else: |
+ url = None |
+ text = None |
+ |
+ cmd = [self._python, self._archive_tool, |
+ '--target', self._target] |
+ self.AddTestStep(shell.ShellCommand, 'Archiving', cmd, |
+ workdir='build/bleeding_edge') |
+ |
+ def AddMoveExtracted(self): |
+ """Adds a step to download and extract a previously archived build.""" |
+ cmd = ('cp -R sconsbuild/release/* bleeding_edge/.') |
+ self._factory.addStep(shell.ShellCommand, |
+ description='Move extracted to bleeding', |
+ timeout=600, |
+ workdir='build', |
+ command=cmd) |