diff options
author | Luis Lozano <llozano@chromium.org> | 2015-12-15 13:49:30 -0800 |
---|---|---|
committer | Luis Lozano <llozano@chromium.org> | 2015-12-16 17:36:06 +0000 |
commit | f2a3ef46f75d2196a93d3ed27f4d1fcf22b54fbe (patch) | |
tree | 185d243c7eed7c7a0db6f0e640746cadc1479ea9 /automation/clients/dejagnu_compiler.py | |
parent | 2a66f70fef907c1cb15229cb58e5129cb620ac98 (diff) | |
download | toolchain-utils-f2a3ef46f75d2196a93d3ed27f4d1fcf22b54fbe.tar.gz |
Run pyformat on all the toolchain-utils files.
This gets rid of a lot of lint issues.
Ran by doing this:
for f in *.py; do echo -n "$f " ; if [ -x $f ]; then pyformat -i
--remove_trailing_comma --yapf --force_quote_type=double $f ; else
pyformat -i --remove_shebang --remove_trailing_comma --yapf
--force_quote_type=double $f ; fi ; done
BUG=chromium:567921
TEST=Ran simple crosperf run.
Change-Id: I59778835fdaa5f706d2e1765924389f9e97433d1
Reviewed-on: https://chrome-internal-review.googlesource.com/242031
Reviewed-by: Luis Lozano <llozano@chromium.org>
Commit-Queue: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'automation/clients/dejagnu_compiler.py')
-rwxr-xr-x | automation/clients/dejagnu_compiler.py | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/automation/clients/dejagnu_compiler.py b/automation/clients/dejagnu_compiler.py index e4342160..eb923d5d 100755 --- a/automation/clients/dejagnu_compiler.py +++ b/automation/clients/dejagnu_compiler.py @@ -1,12 +1,10 @@ #!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. - """dejagnu_compiler.py: Run dejagnu test.""" __author__ = 'shenhan@google.com (Han Shen)' - import logging import optparse import os @@ -38,7 +36,8 @@ class DejagnuCompilerNightlyClient: def CheckoutV14Dir(self): p4view = perforce.View(self.DEPOT2_DIR, [ - perforce.PathMapping('gcctools/chromeos/v14/...')]) + perforce.PathMapping('gcctools/chromeos/v14/...') + ]) return self.GetP4Snapshot(p4view) def GetP4Snapshot(self, p4view): @@ -50,30 +49,37 @@ class DejagnuCompilerNightlyClient: return p4client.SetupAndDo(p4client.Sync(), p4client.Remove()) def CreateJobGroup(self): - chain = cmd.Chain( - self.CheckoutV14Dir(), - cmd.Shell('python', - os.path.join(self.P4_VERSION_DIR, 'test_gcc_dejagnu.py'), - '--board=%s' % self._board, - '--remote=%s' % self._remote, - '--cleanup=%s' % self._cleanup)) + chain = cmd.Chain(self.CheckoutV14Dir(), cmd.Shell( + 'python', os.path.join(self.P4_VERSION_DIR, 'test_gcc_dejagnu.py'), + '--board=%s' % self._board, '--remote=%s' % self._remote, + '--cleanup=%s' % self._cleanup)) label = 'dejagnu' - job = jobs.CreateLinuxJob(label, chain, timeout=8*60*60) - return job_group.JobGroup(label, [job], cleanup_on_failure=True, + job = jobs.CreateLinuxJob(label, chain, timeout=8 * 60 * 60) + return job_group.JobGroup(label, + [job], + cleanup_on_failure=True, cleanup_on_completion=True) @logger.HandleUncaughtExceptions def Main(argv): parser = optparse.OptionParser() - parser.add_option('-b', '--board', dest='board', + parser.add_option('-b', + '--board', + dest='board', help='Run performance tests on these boards') - parser.add_option('-r', '--remote', dest='remote', + parser.add_option('-r', + '--remote', + dest='remote', help='Run performance tests on these remotes') - parser.add_option('-p', '--p4_snapshot', dest='p4_snapshot', + parser.add_option('-p', + '--p4_snapshot', + dest='p4_snapshot', help=('For development only. ' 'Use snapshot instead of checking out.')) - parser.add_option('--cleanup', dest='cleanup', default='mount', + parser.add_option('--cleanup', + dest='cleanup', + default='mount', help=('Cleanup test directory, values could be one of ' '"mount", "chroot" or "chromeos"')) options, _ = parser.parse_args(argv) @@ -82,8 +88,8 @@ def Main(argv): logging.error('Specify a board and remote.') return 1 - client = DejagnuCompilerNightlyClient( - options.board, options.remote, options.p4_snapshot, options.cleanup) + client = DejagnuCompilerNightlyClient(options.board, options.remote, + options.p4_snapshot, options.cleanup) client.Run() return 0 |