diff mbox series

[OSSTEST,v2,1/8] mg-transient-task: New utility

Message ID 20190621142258.1543-2-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series mg-repro-* improvements | expand

Commit Message

Ian Jackson June 21, 2019, 2:22 p.m. UTC
Will be useful in combination with new mode(s) of mg-repro-setup.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 mg-transient-task | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 mg-transient-task
diff mbox series

Patch

diff --git a/mg-transient-task b/mg-transient-task
new file mode 100755
index 00000000..2b3b315e
--- /dev/null
+++ b/mg-transient-task
@@ -0,0 +1,32 @@ 
+#!/usr/bin/tclsh8.5
+# -*- Tcl -*- 
+# usage: ./mg-transient-task PROGRAM [ARGS...]
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2019 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package require Tclx
+
+source ./tcl/daemonlib.tcl
+
+jobdb::become-task [string range "$argv" 0 50]
+exec 2>@ stderr perl -I. -e {
+        use Osstest;
+        use Osstest::Executive;
+        csreadconfig();
+        findtask()
+}
+execl [lindex $argv 0] [lrange $argv 1 end]