From e804b0614a82e9e466a74815aea60337dcefd964 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sat, 5 Mar 2016 00:27:37 +0100 Subject: [PATCH] contrib/rh-bkr: add --valgrind flag Installs valgrind and provides a template for vgdb enabled valgrind-wrapped service. The test harness is expected to pick this up, finish the setup and eventually make use of it. --- contrib/rh-bkr/bkr.py | 7 +++++++ contrib/rh-bkr/job01.xml | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/contrib/rh-bkr/bkr.py b/contrib/rh-bkr/bkr.py index 965aff41e1..66b3c1a545 100755 --- a/contrib/rh-bkr/bkr.py +++ b/contrib/rh-bkr/bkr.py @@ -548,6 +548,7 @@ class CmdSubmit(CmdBase): self.parser.add_argument('--bkr-write-job-id', help='If specified, write the job ID to the specified file.') self.parser.add_argument('--bkr-wait-completion', action='store_true', help='Whether to wait for completion of the beaker job') self.parser.add_argument('--bkr-job-results', help='If specified, write the job results to the specified file. Implies --bkr-wait-completion.') + self.parser.add_argument('--valgrind', action='store_true', help='setup the valgrind wrapper') def _prepare_rpms(self): @@ -846,6 +847,11 @@ class CmdSubmit(CmdBase): return '' return None + def _get_var_for_VALGRIND(self, key): + if self._get_var('VALGRIND') is not None or self.options.valgrind: + return 'valgrind' + return '' + DefaultReplacements = { 'WHITEBOARD' : 'Test NetworkManager', 'DISTRO_FAMILY' : 'RedHatEnterpriseLinux7', @@ -871,6 +877,7 @@ class CmdSubmit(CmdBase): 'CONF_DHCP' : 'dhclient', 'CONF_DEBUG' : 'RLIMIT_CORE,fatal-warnings', 'RPM_LIST' : _get_var_for_RPM_LIST, + 'VALGRIND' : _get_var_for_VALGRIND, } def _process_line_get(self, key, replacements): if key in replacements: diff --git a/contrib/rh-bkr/job01.xml b/contrib/rh-bkr/job01.xml index 088f4b0cad..5408eea094 100644 --- a/contrib/rh-bkr/job01.xml +++ b/contrib/rh-bkr/job01.xml @@ -16,6 +16,7 @@ abrt-tui abrt-addon-ccpp libreport-rhel-bugzilla NetworkManager-wifi +$VALGRIND %end %post --log=/dev/console --erroronfail @@ -90,6 +91,11 @@ fi + + + + +