From patchwork Mon Oct 27 14:00:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 403855 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id B284714007F for ; Tue, 28 Oct 2014 07:00:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 90A2517C8E4; Mon, 27 Oct 2014 16:00:13 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ldA3rPMUTy2U; Mon, 27 Oct 2014 16:00:13 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 6FE5317C8CC; Mon, 27 Oct 2014 15:59:15 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 6250617C8CC for ; Mon, 27 Oct 2014 15:59:14 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dgOm5IFXKf6F for ; Mon, 27 Oct 2014 15:59:09 -0400 (EDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1B9D217C16D for ; Mon, 27 Oct 2014 15:58:59 -0400 (EDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 27 Oct 2014 12:58:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,797,1406617200"; d="scan'208";a="621614817" Received: from unknown (HELO ipeer-e6430-3.jer.intel.com) ([10.12.217.164]) by fmsmga002.fm.intel.com with ESMTP; 27 Oct 2014 12:58:57 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 5/5] tests: Make vm-run.sh arguments non positional Date: Mon, 27 Oct 2014 10:00:57 -0400 Message-Id: <1414418457-5719-6-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1414418457-5719-1-git-send-email-ilan.peer@intel.com> References: <1414418457-5719-1-git-send-email-ilan.peer@intel.com> X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 --- tests/hwsim/vm/vm-run.sh | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh index a6ec511..7626516 100755 --- a/tests/hwsim/vm/vm-run.sh +++ b/tests/hwsim/vm/vm-run.sh @@ -41,19 +41,34 @@ fi CMD=$TESTDIR/vm/inside.sh -if [ "$1" = "--ext" ]; then - shift - DATE=$(date +%s).$1 - shift -else - DATE=$(date +%s) -fi + +unset RUN_TEST_ARGS +DATE=$(date +%s) +CODECOV=no +TIMEWARP=0 +while [ "$1" != "" ]; do + case $1 in + --ext ) shift + DATE=$(date +%s).$1 + shift + ;; + --codecov ) shift + CODECOV=yes + ;; + --timewrap ) shift + TIMEWARP=1 + ;; + * ) + RUN_TEST_ARGS="$RUN_TEST_ARGS$1 " + shift + ;; + esac +done + LOGDIR=$LOGS/$DATE mkdir -p $LOGDIR -if [ "$1" = "--codecov" ]; then - shift - CODECOV=yes +if [ $CODECOV = "yes" ]; then DIR=$PWD if [ -e /tmp/logs ]; then echo "/tmp/logs exists - cannot prepare build trees" @@ -110,13 +125,6 @@ else CODECOV=no fi -if [ "$1" == "--timewarp" ] ; then - TIMEWARP=1 - shift -else - TIMEWARP=0 -fi - echo "Starting test run in a virtual machine" kvm \ @@ -127,7 +135,7 @@ kvm \ -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 \ -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 mv $LOGDIR/alt-wpa_supplicant /tmp/logs