Bug 1229348 - Add a "valgrind-plain" suite to all_mochitest_suites. r=cmanchester.

This commit is contained in:
Julian Seward 2016-02-03 18:43:05 +01:00
parent 1a42bbe3c7
commit 25a02db5ac
5 changed files with 37 additions and 6 deletions

View File

@ -33,6 +33,19 @@ except ImportError:
def get_default_valgrind_suppression_files(): def get_default_valgrind_suppression_files():
# We are trying to locate files in the source tree. So if we # We are trying to locate files in the source tree. So if we
# don't know where the source tree is, we must give up. # don't know where the source tree is, we must give up.
#
# When this is being run by |mach mochitest --valgrind ...|, it is
# expected that |build_obj| is not None, and so the logic below will
# select the correct suppression files.
#
# When this is run from mozharness, |build_obj| is None, and we expect
# that testing/mozharness/configs/unittests/linux_unittests.py will
# select the correct suppression files (and paths to them) and
# will specify them using the --valgrind-supp-files= flag. Hence this
# function will not get called when running from mozharness.
#
# Note: keep these Valgrind .sup file names consistent with those
# in testing/mozharness/configs/unittests/linux_unittest.py.
if build_obj is None or build_obj.topsrcdir is None: if build_obj is None or build_obj.topsrcdir is None:
return [] return []

View File

@ -29,6 +29,9 @@ TEST_HARNESS_FILES.testing.mochitest += [
'/build/mobile/remoteautomation.py', '/build/mobile/remoteautomation.py',
'/build/pgo/server-locations.txt', '/build/pgo/server-locations.txt',
'/build/sanitizers/lsan_suppressions.txt', '/build/sanitizers/lsan_suppressions.txt',
'/build/valgrind/cross-architecture.sup',
'/build/valgrind/i386-redhat-linux-gnu.sup',
'/build/valgrind/x86_64-redhat-linux-gnu.sup',
'/netwerk/test/httpserver/httpd.js', '/netwerk/test/httpserver/httpd.js',
'/testing/mozbase/mozdevice/mozdevice/devicemanager.py', '/testing/mozbase/mozdevice/mozdevice/devicemanager.py',
'/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py', '/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py',

View File

@ -9,12 +9,24 @@ XPCSHELL_NAME = "xpcshell"
EXE_SUFFIX = "" EXE_SUFFIX = ""
DISABLE_SCREEN_SAVER = True DISABLE_SCREEN_SAVER = True
ADJUST_MOUSE_AND_SCREEN = False ADJUST_MOUSE_AND_SCREEN = False
# Note: keep these Valgrind .sup file names consistent with those
# in testing/mochitest/mochitest_options.py.
VALGRIND_SUPP_DIR = os.path.join(os.getcwd(), "build/tests/mochitest")
VALGRIND_SUPP_CROSS_ARCH = os.path.join(VALGRIND_SUPP_DIR,
"cross-architecture.sup")
VALGRIND_SUPP_ARCH = None
if platform.architecture()[0] == "64bit": if platform.architecture()[0] == "64bit":
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux64/releng.manifest" TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux64/releng.manifest"
MINIDUMP_STACKWALK_PATH = "linux64-minidump_stackwalk" MINIDUMP_STACKWALK_PATH = "linux64-minidump_stackwalk"
VALGRIND_SUPP_ARCH = os.path.join(VALGRIND_SUPP_DIR,
"x86_64-redhat-linux-gnu.sup")
else: else:
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/releng.manifest" TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/releng.manifest"
MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk" MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk"
VALGRIND_SUPP_ARCH = os.path.join(VALGRIND_SUPP_DIR,
"i386-redhat-linux-gnu.sup")
##### #####
config = { config = {
@ -188,6 +200,9 @@ config = {
}, },
# local mochi suites # local mochi suites
"all_mochitest_suites": { "all_mochitest_suites": {
"valgrind-plain": ["--valgrind=/usr/bin/valgrind",
"--valgrind-supp-files=" + VALGRIND_SUPP_ARCH +
"," + VALGRIND_SUPP_CROSS_ARCH],
"plain": [], "plain": [],
"plain-chunked": ["--chunk-by-dir=4"], "plain-chunked": ["--chunk-by-dir=4"],
"mochitest-push": ["--subsuite=push"], "mochitest-push": ["--subsuite=push"],

View File

@ -53,6 +53,11 @@ class MozharnessRunner(MozbuildObject):
"--test-packages-url", self.test_packages_url] "--test-packages-url", self.test_packages_url]
}, },
"mochitest-valgrind": {
"script": "desktop_unittest.py",
"config": desktop_unittest_config + [
"--mochitest-suite", "valgrind-plain"]
},
"mochitest": { "mochitest": {
"script": "desktop_unittest.py", "script": "desktop_unittest.py",
"config": desktop_unittest_config + [ "config": desktop_unittest_config + [

View File

@ -88,14 +88,9 @@ TinderBoxPrintRe = {
"harness_error": { "harness_error": {
'full_regex': re.compile(r"(?:TEST-UNEXPECTED-FAIL|PROCESS-CRASH) \| .* \| (application crashed|missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)"), 'full_regex': re.compile(r"(?:TEST-UNEXPECTED-FAIL|PROCESS-CRASH) \| .* \| (application crashed|missing output line for total leaks!|negative leaks caught!|\d+ bytes leaked)"),
'minimum_regex': re.compile(r'''(TEST-UNEXPECTED|PROCESS-CRASH)'''), 'minimum_regex': re.compile(r'''(TEST-UNEXPECTED|PROCESS-CRASH|TEST-VALGRIND-ERROR)'''),
'retry_regex': re.compile(r'''FAIL-SHOULD-RETRY''') 'retry_regex': re.compile(r'''FAIL-SHOULD-RETRY''')
}, },
"valgrind_error": {
'substr': 'TEST-VALGRIND-ERROR',
'level': ERROR,
'explanation': 'Valgrind detected memory errors during the run'
},
} }
TestPassed = [ TestPassed = [