Commit 0b442584 authored by Jan Kiene's avatar Jan Kiene
Browse files

raise Error when error file is given, but needed binary is missing

parent c51e4b9b
Loading
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -544,12 +544,18 @@ def runner_setup(runner, args):
        runner.limit_duration = True
        runner.max_duration = args["limit_duration"]

    if "fer_file" in args.keys() or "ber_file" in args.keys():
        # assert that the eid-xor tool is there
        eid_xor_path = os.path.join(runner.config["utilPath"], "eid-xor")
        if not os.path.isfile(eid_xor_path):
            raise FileNotFoundError(f"Could not find {eid_xor_path} (needed for error pattern insertion)")

    if args["fer_file"]:
        fer_suffix = "fer_{}".format(
            "_".join(os.path.basename(args["fer_file"]).split("."))
        )
        fer_cmd = [
            os.path.join(runner.config["utilPath"], "eid-xor"),
            eid_xor_path,
            "-vbr",
            "-fer",
            "{in_file}",
@@ -564,7 +570,7 @@ def runner_setup(runner, args):
            "_".join(os.path.basename(args["ber_file"]).split("."))
        )
        ber_cmd = [
            os.path.join(runner.config["utilPath"], "eid-xor"),
            eid_xor_path,
            "-vbr",
            "-ber",
            "{in_file}",
@@ -634,12 +640,19 @@ def runner_setup(runner, args):

def analyzer_setup(analyzer, args):
    bs_proc_chain = {}

    if "fer_file" in args.keys() or "ber_file" in args.keys():
        # assert that the eid-xor tool is there
        eid_xor_path = os.path.join(analyzer.config["utilPath"], "eid-xor")
        if not os.path.isfile(eid_xor_path):
            raise FileNotFoundError(f"Could not find {eid_xor_path} (needed for error pattern insertion)")

    if args["fer_file"]:
        fer_suffix = "fer_{}".format(
            "_".join(os.path.basename(args["fer_file"]).split("."))
        )
        fer_cmd = [
            os.path.join(analyzer.config["utilPath"], "eid-xor"),
            eid_xor_path,
            "-vbr",
            "-fer",
            "{in_file}",
@@ -654,7 +667,7 @@ def analyzer_setup(analyzer, args):
            "_".join(os.path.basename(args["ber_file"]).split("."))
        )
        ber_cmd = [
            os.path.join(analyzer.config["utilPath"], "eid-xor"),
            eid_xor_path,
            "-vbr",
            "-ber",
            "{in_file}",