diff --git a/RLTest/debuggers.py b/RLTest/debuggers.py index 36836d8..54e252c 100644 --- a/RLTest/debuggers.py +++ b/RLTest/debuggers.py @@ -23,9 +23,9 @@ def generate_command(self, logfile=None): if '--errors-for-leak-kinds=definite' not in self.options: cmd += ['--errors-for-leak-kinds=definite'] if self.suppressions: - cmd += ['--suppressions=' + self.suppressions] + cmd += ['--suppressions=' + os.path.abspath(self.suppressions)] if logfile: - cmd += ['--log-file=' + logfile] + cmd += ['--log-file=' + os.path.abspath(logfile)] return cmd diff --git a/tests/unit/test_debuggers.py b/tests/unit/test_debuggers.py index 44cde20..d4c8a27 100644 --- a/tests/unit/test_debuggers.py +++ b/tests/unit/test_debuggers.py @@ -13,11 +13,13 @@ def test_generate_command_default(self): def test_generate_command_supression(self): default_valgrind = Valgrind(options="", suppressions="file") cmd_args = default_valgrind.generate_command() - assert ['valgrind', '--error-exitcode=255', '--leak-check=full', '--errors-for-leak-kinds=definite', - '--suppressions=file'] == cmd_args + assert ['valgrind', '--error-exitcode=255', '--leak-check=full', '--errors-for-leak-kinds=definite'] == cmd_args[:4] + assert '--suppressions=' in cmd_args[4] + assert 'file' in cmd_args[4] def test_generate_command_logfile(self): default_valgrind = Valgrind(options="") cmd_args = default_valgrind.generate_command('logfile') - assert ['valgrind', '--error-exitcode=255', '--leak-check=full', '--errors-for-leak-kinds=definite', - '--log-file=logfile'] == cmd_args + assert ['valgrind', '--error-exitcode=255', '--leak-check=full', '--errors-for-leak-kinds=definite'] == cmd_args[:4] + assert '--log-file=' in cmd_args[4] + assert 'logfile' in cmd_args[4]