[node-patches] Change in ovirt-node[master]: [DRAFT] testable-node: Add igor support

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu May 30 12:45:22 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: [DRAFT] testable-node: Add igor support
......................................................................

[DRAFT] testable-node: Add igor support

test-able node is now capable of directly triggering a Igor run, if a
testplan is given.
Additionally testable-node can be pointed to a remote igor instance.

Note that igorc is not yet released.

Change-Id: I0fdc452ef964f0c655c688d69185f026691792cb
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M tools/testable-node
1 file changed, 28 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/03/15203/1

diff --git a/tools/testable-node b/tools/testable-node
index 6e0a436..34f1dbb 100755
--- a/tools/testable-node
+++ b/tools/testable-node
@@ -22,17 +22,21 @@
 verbose=""
 reponame=""
 dry=false
+testplanname=""
+igorurl="192.168.122.1:8080"
 
 IGORPLUGIN=ovirt-node-plugin-igor-slave
 
 
 show_usage()
 {
-    echo "Usage: $0 [-vd] [-r <.repo-file>] -i <isoname>"
+    echo "Usage: $0 [-vdt] [-r <.repo-file>] [-a <url>] -i <isoname>"
     echo " -i    ISO file to be edited"
     echo " -v    Be verbose"
     echo " -r    Additional .repo file"
     echo " -d    Dry - don't execute edit-node"
+    echo " -t    Igor testplan to run on edited iso (if igorc is available)"
+    echo " -a    With -t: URL of the igor host (http://192.168.122.1:8080)"
     echo ""
     echo "$0 can be used to add the $IGORPLUGIN to a "
     echo "given ISO so it can be tested within an igor setup."
@@ -54,7 +58,7 @@
 _parse_opts()
 {
     log "Parsing args: $@"
-    while getopts "h?vdi:r:" opt;
+    while getopts "h?vdi:r:t:a:" opt;
     do
         case "$opt" in
         h|\?)
@@ -68,6 +72,10 @@
         r)  reponame=$OPTARG
             ;;
         d)  dry=true
+            ;;
+        t)  testplanname=$OPTARG
+            ;;
+        a)  igorurl=$OPTARG
             ;;
         esac
     done
@@ -99,10 +107,28 @@
     log "Dry: $dry"
     $dry || ./edit-node $ARGS
 
+    # Shall igorc be called?
+    [[ "$testplanname" ]] && test_with_igor
+
     # Keep temporary repo when in verbose mode
     [[ "$verbose" ]] || unlink $TMPREPO
 
     log "Done"
 }
 
+test_with_igor()
+{
+    [[ -z "$(which igorc)" ]] && die "igorc is missing"
+
+    isoname_testable=$(ls -1 $(dirname $isoname) | grep $IGORPLUGIN | tail -n1)
+    log "Using testable ISO: $isoname_testable"
+
+    [[ -e "$isoname_testable" ]] || die "No testable ISO found."
+
+    igorc_cmdline = "testplan_on_iso ${testplanname} ${isoname_testable} " \
+                    "'local_boot_trigger=${igorurl}/testjob/{igor_cookie}'"
+    log "About to run $igorc $igorc_cmdline"
+    $dry || igorc $igorc_cmdline
+}
+
 main "$@"
\ No newline at end of file


--
To view, visit http://gerrit.ovirt.org/15203
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fdc452ef964f0c655c688d69185f026691792cb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list