diff --git a/benchmarking/mod/benchmark.py b/benchmarking/mod/benchmark.py index 4d87a28..af3d3ab 100644 --- a/benchmarking/mod/benchmark.py +++ b/benchmarking/mod/benchmark.py @@ -18,9 +18,11 @@ def __init__(self): def go(self, testcase, tuning): try: - cancel_file = open("../conf/execute_op_type.conf","r") - execute_op_type = cancel_file.read().strip("\n") - if execute_op_type != "cancel_all": + self.execute_op_type = "execute" + if os.path.exists("../conf/execute_op_type.conf"): + cancel_file = open("../conf/execute_op_type.conf","r") + self.execute_op_type = cancel_file.read().strip("\n") + if self.execute_op_type != "cancel_all": common.bash("rm -f %s/conf/%s" % (self.pwd, common.cetune_log_file)) common.bash("rm -f %s/conf/%s" % (self.pwd, common.cetune_error_file)) user = self.all_conf_data.get("user") @@ -49,6 +51,8 @@ def go(self, testcase, tuning): self.run() except KeyboardInterrupt: interrupted_flag = True + self.execute_op_type = "cancel_one" + os.system("echo 'cancel_one' > ../conf/execute_op_type.conf") self.setStatus("Interrupted") common.printout("WARNING","Caught Signal to Cancel this run, killing Workload now, pls wait") self.real_runtime = time.time() - test_start_time diff --git a/benchmarking/run_cases.py b/benchmarking/run_cases.py index e8a78c6..619c012 100644 --- a/benchmarking/run_cases.py +++ b/benchmarking/run_cases.py @@ -68,6 +68,7 @@ def main(args): if len(p) > 0 and p!="\n": if not p[0].startswith('#'): testcase_list.append({"engine":p[0],"parameter":p[1:]}) + os.system("echo 'execute' > ../conf/execute_op_type.conf") for testcase in testcase_list: if testcase["engine"] == "qemurbd": benchmark = qemurbd.QemuRbd()