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

Unified Diff: tools/asan/asan_test.py

Issue 7922010: Implement the EmbeddedTool class in valgrind_test.py to allow running tools that are embedded int... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/asan/base_unittests.gtest-asan.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/asan/asan_test.py
===================================================================
--- tools/asan/asan_test.py (revision 101277)
+++ tools/asan/asan_test.py (working copy)
@@ -1,60 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# asan_test.py
-
-"""Wrapper for running the test under AddressSanitizer."""
-
-import datetime
-import logging
-import os
-import re
-
-import common
-import path_utils
-import suppressions
-
-
-class ASanWrapper(object):
- def __init__(self, supp_files):
- self._timeout = 1200
-
- def PutEnvAndLog(self, env_name, env_value):
- """Sets the env var |env_name| to |env_value| and writes to logging.info.
- """
- os.putenv(env_name, env_value)
- logging.info('export %s=%s', env_name, env_value)
-
- def Execute(self):
- """Executes the app to be tested."""
- logging.info('starting execution...')
- proc = self._args
- self.PutEnvAndLog('G_SLICE', 'always-malloc')
- self.PutEnvAndLog('NSS_DISABLE_ARENA_FREE_LIST', '1')
- self.PutEnvAndLog('NSS_DISABLE_UNLOAD', '1')
- self.PutEnvAndLog('GTEST_DEATH_TEST_USE_FORK', '1')
- return common.RunSubprocess(proc, self._timeout)
-
- def Main(self, args):
- self._args = args
- start = datetime.datetime.now()
- retcode = -1
- retcode = self.Execute()
- end = datetime.datetime.now()
- seconds = (end - start).seconds
- hours = seconds / 3600
- seconds %= 3600
- minutes = seconds / 60
- seconds %= 60
- logging.info('elapsed time: %02d:%02d:%02d', hours, minutes, seconds)
- logging.info('For more information on the AddressSanitizer bot see '
- 'http://dev.chromium.org/developers/testing/'
- 'addresssanitizer')
- return retcode
-
-
-def RunTool(args, supp_files, module):
- tool = ASanWrapper(supp_files)
- return tool.Main(args[1:])
« no previous file with comments | « no previous file | tools/asan/base_unittests.gtest-asan.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698