# -U allocate with high priority (makes sense with
# specified duration only)
#
+# --dry-run Do not actually allocate, just check feasibility.
+#
# --as <task-spec>
# Run as the task <task-spec> (rather than looking
# at OSSTEST_TASK). Allocation will allocate
our $tid;
our %magictask;
+our $dry_run;
our $list_only;
our $donate_spec;
our $donate_taskid;
} elsif (s/^\-l/-/ || s/^--list$/--/) {
$list_only++;
die "-l may be repeated only thrice\n" if $list_only > 3;
+ } elsif (s/^--dry-run$/-/) {
+ $dry_run= 1;
} elsif (s/^--as$/-/) {
die "--as needs task\n" unless @ARGV;
$ENV{OSSTEST_TASK} = shift @ARGV;
execute(1);
}
-if ($duration) {
+if ($dry_run) {
+ precheck();
+} elsif ($duration) {
die "--donate and --steal are incompatible with the planning system\n"
if @steal_specs || defined $donate_spec;
precheck();