From 9e43d5a4bb0c2cfe553a6cbe89e3db6b8c14f5e8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Jan 2016 16:26:51 +1100 Subject: [PATCH] autotest: added defaults_file option to start_SIL() --- Tools/autotest/pysim/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/pysim/util.py b/Tools/autotest/pysim/util.py index 8fda1494e0..7e17d7ed14 100644 --- a/Tools/autotest/pysim/util.py +++ b/Tools/autotest/pysim/util.py @@ -105,7 +105,7 @@ def pexpect_drain(p): except pexpect.TIMEOUT: pass -def start_SIL(atype, valgrind=False, wipe=False, synthetic_clock=True, home=None, model=None, speedup=1): +def start_SIL(atype, valgrind=False, wipe=False, synthetic_clock=True, home=None, model=None, speedup=1, defaults_file=None): '''launch a SIL instance''' import pexpect cmd="" @@ -125,6 +125,8 @@ def start_SIL(atype, valgrind=False, wipe=False, synthetic_clock=True, home=None cmd += ' --model=%s' % model if speedup != 1: cmd += ' --speedup=%f' % speedup + if defaults_file is not None: + cmd += ' --defaults=%s' % defaults_file print("Running: %s" % cmd) ret = pexpect.spawn(cmd, logfile=sys.stdout, timeout=5) ret.delaybeforesend = 0