def run_sim(self, yaml, output, options="", silent=False, obj=None, tunables=None): if output: user_cmd = "-f {0} -o {1} {2} -p {3}".format( yaml, output, options, self.scripts_path) else: user_cmd = "-f {0} {1} -p {2}".format(yaml, options, self.scripts_path) if silent: user_cmd += " --silent" if tunables: user_cmd += " -t" for k, v in tunables.items(): user_cmd += " {0}={1}".format(k, v) rc = trex_stl_sim.main(args=shlex.split(user_cmd)) if obj: obj['rc'] = (rc == 0) return (rc == 0)
def run_sim(self, yaml, output, options="", silent=False, obj=None): if output: user_cmd = "-f {0} -o {1} {2} -p {3}".format(yaml, output, options, self.scripts_path) else: user_cmd = "-f {0} {1} -p {2}".format(yaml, options, self.scripts_path) if silent: user_cmd += " --silent" rc = trex_stl_sim.main(args=shlex.split(user_cmd)) if obj: obj["rc"] = rc == 0 return rc == 0
def run_sim (self, yaml, output, options = "", silent = False, obj = None): if output: user_cmd = "-f {0} -o {1} {2}".format(yaml, output, options) else: user_cmd = "-f {0} {1}".format(yaml, options) if silent: user_cmd += " --silent" rc = trex_stl_sim.main(args = shlex.split(user_cmd)) if obj: obj['rc'] = (rc == 0) return (rc == 0)
def run_sim (self, yaml, output, options = "", silent = False, obj = None, tunables = None): if output: user_cmd = "-f {0} -o {1} {2} -p {3}".format(yaml, output, options, self.scripts_path) else: user_cmd = "-f {0} {1} -p {2}".format(yaml, options, self.scripts_path) if silent: user_cmd += " --silent" if tunables: user_cmd += " -t" for k, v in tunables.items(): user_cmd += " {0}={1}".format(k, v) rc = trex_stl_sim.main(args = shlex.split(user_cmd)) if obj: obj['rc'] = (rc == 0) return (rc == 0)