Bug 958376 - |mach valgrind-test|: Add a --suppressions option. r=gps.

--HG--
extra : rebase_source : 2e8e6618bb3b1a68ee25efb4c76acb8e53a5a4b2
This commit is contained in:
Nicholas Nethercote 2014-01-19 13:53:21 -08:00
parent 81bb2e8383
commit 9ac80c6e57

View File

@ -8,8 +8,9 @@ import os
import subprocess
from mach.decorators import (
CommandProvider,
Command,
CommandArgument,
CommandProvider,
)
from mozbuild.base import (
MachCommandBase,
@ -34,7 +35,12 @@ class MachCommands(MachCommandBase):
@Command('valgrind-test', category='testing',
conditions=[conditions.is_firefox, is_valgrind_build],
description='Run the Valgrind test job.')
def valgrind_test(self):
@CommandArgument('--suppressions', default=[], action='append',
metavar='FILENAME',
help='Specify a suppression file for Valgrind to use. Use '
'--suppression multiple times to specify multiple suppression '
'files.')
def valgrind_test(self, suppressions):
import json
import sys
import tempfile
@ -101,6 +107,9 @@ class MachCommands(MachCommandBase):
'--track-origins=yes'
]
for s in suppressions:
valgrind_args.append('--suppressions=' + s)
supps_dir = os.path.join(build_dir, 'valgrind')
supps_file1 = os.path.join(supps_dir, 'cross-architecture.sup')
valgrind_args.append('--suppressions=' + supps_file1)