Skip to content
Snippets Groups Projects
Commit 4007bb32 authored by Petr Špaček's avatar Petr Špaček
Browse files

Merge branch 'wrapper' into 'master'

introduce DECKARD_WRAPPER env variable for easier debugging

See merge request !188
parents e7ad66d9 df4da171
No related branches found
No related tags found
1 merge request!188introduce DECKARD_WRAPPER env variable for easier debugging
Pipeline #66925 failed
......@@ -3,6 +3,7 @@ import errno
import logging
import logging.config
import os
import shlex
import shutil
import socket
import subprocess
......@@ -110,7 +111,11 @@ def run_daemon(program_config):
proc = None
program_config['log'] = os.path.join(program_config["WORKING_DIR"], 'server.log')
daemon_log_file = open(program_config['log'], 'w')
program_config['args'] = [program_config['binary']] + program_config['additional']
program_config['args'] = (
shlex.split(os.environ.get('DECKARD_WRAPPER', ''))
+ [program_config['binary']]
+ program_config['additional']
)
logging.getLogger('deckard.daemon.%s.argv' % name).debug('%s', program_config['args'])
try:
proc = subprocess.Popen(program_config['args'], stdout=daemon_log_file,
......
......@@ -269,6 +269,7 @@ Tips:
- working directory can be explicitly specified in environment variable ``DECKARD_DIR`
- command line argument ``--log-level DEBUG`` forces extra verbose logging, including logs from all binaries and packets handled by Deckard
- environment variable ``DECKARD_NOCLEAN`` instructs Deckard not to remove working directories after successful tests
- environment variable ``DECKARD_WRAPPER`` is prepended to all commands to be executed, intended usage is to run binary under test with ``valgrind`` or ``rr record``
Writting own scenarios
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment