tests: Make vm-run.sh arguments non-positional
This was currently breaking parallel-run.*, as it was passing --split num/num parameters (intended for rnu-tests.py) to vm-run.sh which broke the --codecov and --timewrap options. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
40c57fa88f
commit
006a1c4d3b
1 changed files with 26 additions and 18 deletions
|
@ -41,19 +41,34 @@ fi
|
||||||
|
|
||||||
|
|
||||||
CMD=$TESTDIR/vm/inside.sh
|
CMD=$TESTDIR/vm/inside.sh
|
||||||
if [ "$1" = "--ext" ]; then
|
|
||||||
shift
|
unset RUN_TEST_ARGS
|
||||||
|
DATE=$(date +%s)
|
||||||
|
CODECOV=no
|
||||||
|
TIMEWARP=0
|
||||||
|
while [ "$1" != "" ]; do
|
||||||
|
case $1 in
|
||||||
|
--ext ) shift
|
||||||
DATE=$(date +%s).$1
|
DATE=$(date +%s).$1
|
||||||
shift
|
shift
|
||||||
else
|
;;
|
||||||
DATE=$(date +%s)
|
--codecov ) shift
|
||||||
fi
|
CODECOV=yes
|
||||||
|
;;
|
||||||
|
--timewrap ) shift
|
||||||
|
TIMEWARP=1
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
RUN_TEST_ARGS="$RUN_TEST_ARGS$1 "
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
LOGDIR=$LOGS/$DATE
|
LOGDIR=$LOGS/$DATE
|
||||||
mkdir -p $LOGDIR
|
mkdir -p $LOGDIR
|
||||||
|
|
||||||
if [ "$1" = "--codecov" ]; then
|
if [ $CODECOV = "yes" ]; then
|
||||||
shift
|
|
||||||
CODECOV=yes
|
|
||||||
DIR=$PWD
|
DIR=$PWD
|
||||||
if [ -e /tmp/logs ]; then
|
if [ -e /tmp/logs ]; then
|
||||||
echo "/tmp/logs exists - cannot prepare build trees"
|
echo "/tmp/logs exists - cannot prepare build trees"
|
||||||
|
@ -110,13 +125,6 @@ else
|
||||||
CODECOV=no
|
CODECOV=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "--timewarp" ] ; then
|
|
||||||
TIMEWARP=1
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
TIMEWARP=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Starting test run in a virtual machine"
|
echo "Starting test run in a virtual machine"
|
||||||
|
|
||||||
kvm \
|
kvm \
|
||||||
|
@ -127,7 +135,7 @@ kvm \
|
||||||
-fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \
|
-fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \
|
||||||
-device virtio-9p-pci,id=fs-logs,fsdev=fsdev-logs,mount_tag=logshare \
|
-device virtio-9p-pci,id=fs-logs,fsdev=fsdev-logs,mount_tag=logshare \
|
||||||
-monitor null -serial stdio -serial file:$LOGDIR/console \
|
-monitor null -serial stdio -serial file:$LOGDIR/console \
|
||||||
-append "mac80211_hwsim.support_p2p_device=0 mac80211_hwsim.channels=$CHANNELS mac80211_hwsim.radios=6 init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$*"
|
-append "mac80211_hwsim.support_p2p_device=0 mac80211_hwsim.channels=$CHANNELS mac80211_hwsim.radios=6 init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$RUN_TEST_ARGS"
|
||||||
|
|
||||||
if [ $CODECOV = "yes" ]; then
|
if [ $CODECOV = "yes" ]; then
|
||||||
mv $LOGDIR/alt-wpa_supplicant /tmp/logs
|
mv $LOGDIR/alt-wpa_supplicant /tmp/logs
|
||||||
|
|
Loading…
Add table
Reference in a new issue