diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-08 21:56:42 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-08 21:56:42 +0000 |
commit | 26788a65a7f9094a0acd44ea69c3cdbea5b1f498 (patch) | |
tree | 86157cd8ec540bf1d7a606df77f46abbbef86121 /tools/valgrind/common.py | |
parent | 0d5a3df2a5d0b89305bbad7c0efe8532e1cccb40 (diff) | |
download | chromium_src-26788a65a7f9094a0acd44ea69c3cdbea5b1f498.zip chromium_src-26788a65a7f9094a0acd44ea69c3cdbea5b1f498.tar.gz chromium_src-26788a65a7f9094a0acd44ea69c3cdbea5b1f498.tar.bz2 |
wine_valgrind: Use common Valgrind scripts to run Wine/Valgrind tests.
Use test and valgrind suppressions from the same locations as the other valgrind bots.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/561045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind/common.py')
-rwxr-xr-x | tools/valgrind/common.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/valgrind/common.py b/tools/valgrind/common.py index 8f85d40..52af411 100755 --- a/tools/valgrind/common.py +++ b/tools/valgrind/common.py @@ -27,7 +27,13 @@ def _print_line(line, flush=True): sys.stdout.flush() -def RunSubprocess(proc, timeout=0, detach=False): +def RunSubprocessInBackground(proc): + """Runs a subprocess in the background. Returns a handle to the process.""" + logging.info("running %s in the background" % " ".join(proc)) + return subprocess.Popen(proc) + + +def RunSubprocess(proc, timeout=0, detach=False, background=False): """ Runs a subprocess, until it finishes or |timeout| is exceeded and the process is killed with taskkill. A |timeout| <= 0 means no timeout. @@ -128,8 +134,19 @@ def IsWindows(): return sys.platform == 'cygwin' or sys.platform.startswith('win') +def IsWine(): + """This needs to be set by the script that starts the buildbot, i.e. + /etc/init.d/buildbot, or manually on the command line.""" + return (os.environ.get('WINE') and + os.environ.get('WINEPREFIX') and + os.environ.get('WINESERVER')) + + def PlatformName(): """Return a string to be used in paths for the platform.""" + # This has to be before IsLinux() + if IsWine(): + return 'wine' if IsLinux(): return 'linux' if IsMac(): |