Commit 86df66e5 authored by Leigh B. Stoller's avatar Leigh B. Stoller

With great remorse, I fix my last revision.

parent 26d0be70
......@@ -58,7 +58,7 @@ sub CheckCopyArgs();
sub CopyInArchive();
sub fatal($);
my $optlist = "iE:g:e:p:S:L:a:l:sfwqt:nzc:bx";
my $optlist = "iE:g:e:p:S:L:a:l:sfwqt:nzc:bxy:";
my $batchmode= 1;
my $frontend = 0;
my $waitmode = 0;
......@@ -67,7 +67,8 @@ my $linktest = 0; # non-zero means level to run at.
my $zeemode = 0; # Hey, out of options.
my $zeeopt = ""; # To pass along.
my $savestate= 0;
my $template_mode = 0; # New stuff; experiment templates.
my $template_mode = 0; # New stuff; experiment templates.
my $instance_idx = 0; # New stuff; experiment templates.
# All of these are for experiment dup and branch. Really mucks things up.
# These globals are set when we parse the -c argument, but used later
my $copybranch = 0; # A branch instead of a duplicate
......@@ -324,14 +325,14 @@ if (! DBQueryWarn("INSERT INTO experiments ".
" idleswap, idleswap_timeout, autoswap, autoswap_timeout,".
" idle_ignore, keyhash, expt_locked, eventkey,".
" noswap_reason, noidleswap_reason, batchmode, ".
" batchstate, linktest_level, savedisk) ".
" batchstate, linktest_level, savedisk, instance_idx) ".
"VALUES ($exptidx, '$eid', '$pid', '$gid', now(), ".
"$description,'$dbuid', '$dbuid', '$exptstate', $priority, ".
"$swappable, $idleswap, '$swaptime', $autoswap, ".
"'$autoswaptime', $idleignore, '$webkey', ".
"now(), '$eventkey', $noswap_reason, ".
"$noidleswap_reason, $batchmode, '$batchstate', ".
"$linktest, $savestate)")) {
"$linktest, $savestate, $instance_idx)")) {
DBQueryWarn("unlock tables");
tbdie("DB error inserting experiment record for $pid/$eid!");
}
......@@ -1106,6 +1107,17 @@ sub ParseArgs()
}
if (defined($options{"x"})) {
$template_mode = 1;
if (defined($options{"y"})) {
$instance_idx = $options{"y"};
if ($instance_idx =~ /^([\d]+)$/) {
$instance_idx = $1;
}
else {
tbdie("Bad data in argument: $instance_idx.");
}
}
}
}
......
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