diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-01-08 17:05:39 +0530 |
---|---|---|
committer | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-01-08 17:12:45 +0530 |
commit | 10396ca4b01491a9ec5c00d2fd67657379f6ed95 (patch) | |
tree | f37e6f6b78e9a571455dc2ddb97cfc73f69f9e7c | |
parent | 9265643d0f763aff1f698882ecc20f57eb8ff381 (diff) |
Ubuntu: Adding new test case wlan download test
The goal of the test is to validate wlan when eth is also up.
Large file should be downloaded in order to stress interface/driver a bit.
Testing steps:
- Download given file via wlan interface
- After successful download validate md5sum of the file with given md5sum
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-x | ubuntu/scripts/wlan-download-test.sh | 50 | ||||
-rw-r--r-- | ubuntu/wlan-download-test.yaml | 38 |
2 files changed, 88 insertions, 0 deletions
diff --git a/ubuntu/scripts/wlan-download-test.sh b/ubuntu/scripts/wlan-download-test.sh new file mode 100755 index 0000000..a108dfa --- /dev/null +++ b/ubuntu/scripts/wlan-download-test.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# wlan download test case +# +# Copyright (C) 2012 - 2016, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Naresh Kamboju <naresh.kamboju@linaro.org> +# + +# +# get a known file for download +# + +URL=$1 +MD5SUM_CHECK=$2 +OUTPUT_FILE_NAME="output_file" +CURL=`which curl` +MD5SUM=`which md5sum` + +# Assume wlan is up and running +WLAN=`/sbin/ifconfig | grep wlan | awk '{print $1}'` + +echo "========" +which curl +if [ $? == 0 ] ; then + curl --connect-timeout 5 --interface $WLAN $URL > $OUTPUT_FILE_NAME +fi + +# Get md5sum of output_file +GET_MD5SUM=`$MD5SUM $OUTPUT_FILE_NAME | awk '{print $1}'` +echo "GET_MD5SUM= $GET_MD5SUM" +if [ "$MD5SUM_CHECK" = $GET_MD5SUM ] + echo "wlan-download-testcase=pass" +else + echo "wlan-download-testcase=fail" +fi diff --git a/ubuntu/wlan-download-test.yaml b/ubuntu/wlan-download-test.yaml new file mode 100644 index 0000000..3d2a2a8 --- /dev/null +++ b/ubuntu/wlan-download-test.yaml @@ -0,0 +1,38 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: wlan-download-test + description: "wlan download test" + maintainer: + - naresh.kamboju@linaro.org + os: + - ubuntu + scope: + - functional + devices: + - panda + - panda-es + - arndale + - vexpress-a9 + - vexpress-tc2 + - beaglebone-black + - d01 + - juno + environment: + - lava-test-shell + +params: + URL: "http://testdata.validation.linaro.org/media_codec/vpx_streams/vp90-2-tos_1280x534_tile_1x4_1306kbps.webm" + MD5SUM_CHECK: "5d99923b6d40ec031bbb821c8ad3bfca" + +install: + deps: + - coreutils + - curl + - gawk + +run: + steps: + - ./ubuntu/scripts/wlan-download-test.sh $URL $MD5SUM_CHECK + +parse: + pattern: "^(?P<test_case_id>.*)=(?P<result>.*)" |