mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1229348 - Add a "valgrind-plain" suite to all_mochitest_suites. r=cmanchester.
This commit is contained in:
parent
1a42bbe3c7
commit
25a02db5ac
@ -33,6 +33,19 @@ except ImportError:
|
||||
def get_default_valgrind_suppression_files():
|
||||
# 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.
|
||||
#
|
||||
# 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:
|
||||
return []
|
||||
|
||||
|
@ -29,6 +29,9 @@ TEST_HARNESS_FILES.testing.mochitest += [
|
||||
'/build/mobile/remoteautomation.py',
|
||||
'/build/pgo/server-locations.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',
|
||||
'/testing/mozbase/mozdevice/mozdevice/devicemanager.py',
|
||||
'/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py',
|
||||
|
@ -9,12 +9,24 @@ XPCSHELL_NAME = "xpcshell"
|
||||
EXE_SUFFIX = ""
|
||||
DISABLE_SCREEN_SAVER = True
|
||||
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":
|
||||
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux64/releng.manifest"
|
||||
MINIDUMP_STACKWALK_PATH = "linux64-minidump_stackwalk"
|
||||
VALGRIND_SUPP_ARCH = os.path.join(VALGRIND_SUPP_DIR,
|
||||
"x86_64-redhat-linux-gnu.sup")
|
||||
else:
|
||||
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/releng.manifest"
|
||||
MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk"
|
||||
VALGRIND_SUPP_ARCH = os.path.join(VALGRIND_SUPP_DIR,
|
||||
"i386-redhat-linux-gnu.sup")
|
||||
|
||||
#####
|
||||
config = {
|
||||
@ -188,6 +200,9 @@ config = {
|
||||
},
|
||||
# local mochi suites
|
||||
"all_mochitest_suites": {
|
||||
"valgrind-plain": ["--valgrind=/usr/bin/valgrind",
|
||||
"--valgrind-supp-files=" + VALGRIND_SUPP_ARCH +
|
||||
"," + VALGRIND_SUPP_CROSS_ARCH],
|
||||
"plain": [],
|
||||
"plain-chunked": ["--chunk-by-dir=4"],
|
||||
"mochitest-push": ["--subsuite=push"],
|
||||
|
@ -53,6 +53,11 @@ class MozharnessRunner(MozbuildObject):
|
||||
"--test-packages-url", self.test_packages_url]
|
||||
},
|
||||
|
||||
"mochitest-valgrind": {
|
||||
"script": "desktop_unittest.py",
|
||||
"config": desktop_unittest_config + [
|
||||
"--mochitest-suite", "valgrind-plain"]
|
||||
},
|
||||
"mochitest": {
|
||||
"script": "desktop_unittest.py",
|
||||
"config": desktop_unittest_config + [
|
||||
|
@ -88,14 +88,9 @@ TinderBoxPrintRe = {
|
||||
|
||||
"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)"),
|
||||
'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''')
|
||||
},
|
||||
"valgrind_error": {
|
||||
'substr': 'TEST-VALGRIND-ERROR',
|
||||
'level': ERROR,
|
||||
'explanation': 'Valgrind detected memory errors during the run'
|
||||
},
|
||||
}
|
||||
|
||||
TestPassed = [
|
||||
|
Loading…
Reference in New Issue
Block a user