diff --git a/tests/hwsim/run-all.sh b/tests/hwsim/run-all.sh index 7c50edd79..75c3a58b5 100755 --- a/tests/hwsim/run-all.sh +++ b/tests/hwsim/run-all.sh @@ -16,7 +16,9 @@ if [ -z "$DBFILE" ]; then DB="" else DB="-S $DBFILE" - COMMITID="$(git rev-parse HEAD)" + if [ -z "$COMMITID" ]; then + COMMITID="$(git rev-parse HEAD)" + fi if [ -n "$COMMITID" ]; then DB="$DB --commit $COMMITID" fi diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index bfcbda631..11ded93f4 100755 --- a/tests/hwsim/vm/inside.sh +++ b/tests/hwsim/vm/inside.sh @@ -37,6 +37,11 @@ EPATH=$(sed 's/.*EPATH=\([^ ]*\) .*/\1/' /proc/cmdline) TELNET=$(sed 's/.*TELNET=\([^ ]*\) .*/\1/' /proc/cmdline) ARGS=$(sed 's/.*ARGS=\([^ ]*\)\( \|$\).*/\1/' /proc/cmdline) LOGDIR=$(sed 's/.*LOGDIR=\([^ ]*\)\( \|$\).*/\1/' /proc/cmdline) +if grep -q "commitid=" /proc/cmdline; then + COMMITID=$(sed 's/.*commitid=\([^ ]*\)\( \|$\).*/\1/' /proc/cmdline) +else + COMMITID= +fi mount --bind "$TESTDIR/vm/regdb/" /lib/firmware @@ -146,6 +151,7 @@ else export LOGDIR=/tmp/logs export DBFILE=$LOGDIR/results.db export PREFILL_DB=y + export COMMITID # some tests need CRDA, install a simple uevent helper # and preload the 00 domain it will have asked for already diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh index 06dee0689..7a0273ac4 100755 --- a/tests/hwsim/vm/vm-run.sh +++ b/tests/hwsim/vm/vm-run.sh @@ -154,6 +154,10 @@ A+="TELNET=$TELNET_ARG " A+="EPATH=$EPATH " A+="ARGS=$argsfile " A+="console=$KVMOUT " +COMMITID="$(git rev-parse HEAD)" +if [ -n "$COMMITID" ]; then + A+="commitid=$COMMITID " +fi A+="ro" if [ -z $KVM ]; then