diff mbox

[kvm-unit-tests,v2,2/6] run: check DRYRUN

Message ID 1436806983-29783-3-git-send-email-drjones@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Jones July 13, 2015, 5:02 p.m. UTC
Only execute the test if DRYRUN isn't set to yes. This is used
by mkstandalone.sh

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 arm/run | 12 +++++++-----
 x86/run | 11 +++++++----
 2 files changed, 14 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/arm/run b/arm/run
index 662a8564674a3..8cc2fa2571967 100755
--- a/arm/run
+++ b/arm/run
@@ -44,9 +44,11 @@  fi
 
 command="$qemu $M -cpu $processor $chr_testdev"
 command+=" -display none -serial stdio -kernel"
-
 echo $command "$@"
-$command "$@"
-ret=$?
-echo Return value from qemu: $ret
-exit $ret
+
+if [ "$DRYRUN" != "yes" ]; then
+	$command "$@"
+	ret=$?
+	echo Return value from qemu: $ret
+	exit $ret
+fi
diff --git a/x86/run b/x86/run
index 5281fca2125d8..b4a35b2332846 100755
--- a/x86/run
+++ b/x86/run
@@ -44,7 +44,10 @@  fi
 
 command="${qemu} -enable-kvm $pc_testdev -vnc none -serial stdio $pci_testdev -kernel"
 echo ${command} "$@"
-${command} "$@"
-ret=$?
-echo Return value from qemu: $ret
-exit $ret
+
+if [ "$DRYRUN" != "yes" ]; then
+	${command} "$@"
+	ret=$?
+	echo Return value from qemu: $ret
+	exit $ret
+fi