]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
mg-allocate: Support --as
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 22 Mar 2016 18:54:28 +0000 (18:54 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 27 Jun 2016 16:55:55 +0000 (17:55 +0100)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
mg-allocate

index 08fa96d06ffcbf3b71507adc7993df9d9a78d1cb..95e1a3024e9f49c5a62afcf9eda7cfbc9aef511a 100755 (executable)
 #   -U             allocate with high priority (makes sense with
 #                  specified duration only)
 #
+#   --as <task-spec>
+#                  Run as the task <task-spec> (rather than looking
+#                  at OSSTEST_TASK).  Allocation will allocate
+#                  resources to <task-spec> and deallocate will free
+#                  resources owned by <task-spec>
+#
 #   --steal <task-spec>
 #                  Treat resources owned by the task <task-spec>
 #                  as if they were free.  This allows us to steal
@@ -425,6 +431,9 @@ while (@ARGV && $ARGV[0] =~ m/^[-0-9]/) {
                                              1);
         } elsif (s/^\-U/-/) {
             $ENV{OSSTEST_RESOURCE_PRIORITY} //= -1000000;
+        } elsif (s/^--as$/-/) {
+           die "--as needs task\n" unless @ARGV;
+           $ENV{OSSTEST_TASK} = shift @ARGV;
        } elsif (s/^--steal$/-/) {
            die "--steal needs task\n" unless @ARGV;
            push @steal_specs, shift @ARGV;