Commit 52f86e79 authored by Michael Terry's avatar Michael Terry

tests: and allow test scripts to actually specify a script for the mock duplicity to run

parent 37d5a95e
......@@ -332,6 +332,7 @@ void process_duplicity_run_block(KeyFile keyfile, string run, BackupRunner br) t
bool encrypted = false;
bool cancel = false;
bool stop = false;
string script = null;
Mode mode = Mode.NONE;
var parts = run.split(" ", 2);
......@@ -354,6 +355,8 @@ void process_duplicity_run_block(KeyFile keyfile, string run, BackupRunner br) t
outputscript = run_script(replace_keywords(keyfile.get_comment(group, "OutputScript")));
if (keyfile.has_key(group, "Stop"))
stop = keyfile.get_boolean(group, "Stop");
if (keyfile.has_key(group, "Script"))
script = keyfile.get_boolean(group, "Script");
}
if (type == "status")
......@@ -389,6 +392,9 @@ void process_duplicity_run_block(KeyFile keyfile, string run, BackupRunner br) t
};
}
if (script != null)
dupscript += "\n" + "SCRIPT: " + script;
if (outputscript != null && outputscript != "")
dupscript += "\n\n" + outputscript + "\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment