summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2016-09-20 13:24:37 +0530
committerNaresh Kamboju <naresh.kamboju@linaro.org>2016-09-20 13:24:37 +0530
commit7f0affa48f384bc68dc458bf834cd924e9cb6e1f (patch)
tree5fd889f279cd857fd446c2908ab49d47acdb2926
parenta862a5b10477459dd3e42d792f7d0406f16bc6a5 (diff)
parent0c69ba192e3b7af9a70b2dbdc0d93c401c10dcb2 (diff)
Merge commit 'refs/changes/84/14384/1' of https://review.linaro.org/qa/test-definitions into device-tree
-rw-r--r--android/cts-host.yaml3
-rwxr-xr-xandroid/scripts/cts.py10
-rwxr-xr-xautomated/lib/sh-test-lib38
-rw-r--r--automated/linux/lamp/html/add-record.php24
-rw-r--r--automated/linux/lamp/html/connect-db.php14
-rw-r--r--automated/linux/lamp/html/create-db.php22
-rw-r--r--automated/linux/lamp/html/create-table.php30
-rw-r--r--automated/linux/lamp/html/delete-record.php24
-rw-r--r--automated/linux/lamp/html/index.html11
-rw-r--r--automated/linux/lamp/html/info.php1
-rw-r--r--automated/linux/lamp/html/select-record.php26
-rwxr-xr-xautomated/linux/lamp/lamp.sh98
-rw-r--r--automated/linux/lamp/lamp.yaml29
-rwxr-xr-xautomated/linux/openjdk/openjdk-smoke.sh65
-rw-r--r--automated/linux/openjdk/openjdk-smoke.yaml33
-rwxr-xr-xautomated/linux/usb-smoke/usb-smoke-test.sh108
-rw-r--r--automated/linux/usb-smoke/usb-smoke-test.yaml37
-rw-r--r--openembedded/pwrmgmt.yaml2
-rw-r--r--ubuntu/pwrmgmt.yaml2
-rw-r--r--ubuntu/start-kvm.yaml2
-rw-r--r--ubuntu/stop-guest.yaml22
21 files changed, 587 insertions, 14 deletions
diff --git a/android/cts-host.yaml b/android/cts-host.yaml
index ceae5c1..5da8373 100644
--- a/android/cts-host.yaml
+++ b/android/cts-host.yaml
@@ -15,6 +15,8 @@ metadata:
install:
steps:
+ - dpkg --add-architecture i386
+ - apt-get update
- ./common/scripts/install-deps.sh $DEPENDENCIES $JDK $JRE
params:
@@ -45,6 +47,7 @@ run:
- adb devices
# increase the heap size. KVM devices in LAVA default to ~250M of heap
- export _JAVA_OPTIONS="-Xmx350M"
+ - java -version
- ./android/scripts/cts.py $CTS_URL $IPADDR $TEST_PARAMS
- echo "processes running"
- ps
diff --git a/android/scripts/cts.py b/android/scripts/cts.py
index fab821f..a55c723 100755
--- a/android/scripts/cts.py
+++ b/android/scripts/cts.py
@@ -119,12 +119,12 @@ def result_parser(xml_file):
root = tree.getroot()
print 'There are ' + str(len(root.findall('TestPackage'))) + ' Test Packages in this test result file: ' + xml_file
# testcase_counter = 0
- for elem in root.findall('TestPackage'):
+ for elem in root.findall('Module'):
# Naming: Package Name + Test Case Name + Test Name
if 'abi' in elem.attrib.keys():
- package_name = '.'.join([elem.attrib['abi'], elem.attrib['appPackageName']])
+ package_name = '.'.join([elem.attrib['abi'], elem.attrib['name']])
else:
- package_name = elem.attrib['appPackageName']
+ package_name = elem.attrib['name']
tests_executed = len(elem.findall('.//Test'))
tests_passed = len(elem.findall('.//Test[@result="pass"]'))
tests_failed = len(elem.findall('.//Test[@result="fail"]'))
@@ -225,8 +225,8 @@ subprocess.call(['lava-test-run-attach', CTS_STDOUT + '.gz'])
subprocess.call(['lava-test-run-attach', CTS_LOGCAT + '.gz'])
# locate and parse the test result
-result_dir = 'android-cts/repository/results'
-test_result = 'testResult.xml'
+result_dir = 'android-cts/results'
+test_result = 'test_result.xml'
if os.path.exists(result_dir) and os.path.isdir(result_dir):
for root, dirs, files in os.walk(result_dir):
for name in files:
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index 3edecb8..39a7e92 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -7,7 +7,7 @@ error_msg() {
local msg="$1"
[ -z "${msg}" ] && msg="Unknown error"
printf "ERROR: %s\n" "${msg}" >&2
- exit 1
+ exit 0
}
warn_msg() {
@@ -32,12 +32,27 @@ check_root() {
exit_on_fail() {
local exit_code="$?"
- [ "$#" -ne 1 ] && error_msg "Usage: exit_on_fail test"
+ [ "$#" -lt 1 ] && error_msg "Usage: exit_on_fail test [skip_list]"
local test="$1"
+ local skip_list="$2"
if [ "${exit_code}" -ne 0 ]; then
echo "${test} fail" | tee -a "${RESULT_FILE}"
- exit 1
+
+ # skip_list is a list of tests sepereated by space. This might be
+ # useful when exiting on prerequisite not met.
+ if [ -n "${skip_list}" ]; then
+ for i in ${skip_list}; do
+ echo "$i skip" | tee -a "${RESULT_FILE}"
+ done
+ fi
+
+ # Exit normally to continue to run the following steps defined in test
+ # definition file.
+ exit 0
+ else
+ echo "${test} pass" | tee -a "${RESULT_FILE}"
+ return 0
fi
}
@@ -55,6 +70,18 @@ check_return() {
fi
}
+report_pass() {
+ [ "$#" -ne 1 ] && error_msg "Usage: report_pass test"
+ local test="$1"
+ echo "${test} pass" | tee -a "${RESULT_FILE}"
+}
+
+report_fail() {
+ [ "$#" -ne 1 ] && error_msg "Usage: report_fail test"
+ local test="$1"
+ echo "${test} fail" | tee -a "${RESULT_FILE}"
+}
+
add_metric() {
if [ "$#" -ne 4 ]; then
warn_msg "The number of parameters less then 4"
@@ -99,8 +126,9 @@ install_deps() {
dist_name
case "${dist}" in
Debian|Ubuntu)
- apt-get update
- apt-get install -y -q ${pkgs}
+ # Use the default answers for all questions.
+ DEBIAN_FRONTEND=noninteractive apt-get update -q -y
+ DEBIAN_FRONTEND=noninteractive apt-get install -q -y ${pkgs}
;;
CentOS)
yum -e 0 -y install ${pkgs}
diff --git a/automated/linux/lamp/html/add-record.php b/automated/linux/lamp/html/add-record.php
new file mode 100644
index 0000000..f721677
--- /dev/null
+++ b/automated/linux/lamp/html/add-record.php
@@ -0,0 +1,24 @@
+<?php
+$servername = "localhost";
+$username = "root";
+$password = "lamptest";
+$dbname = "myDB";
+
+// Create connection
+$conn = mysqli_connect($servername, $username, $password, $dbname);
+// Check connection
+if (!$conn) {
+ die("Connection failed: " . mysqli_connect_error());
+}
+
+$sql = "INSERT INTO MyGuests (firstname, lastname, email)
+VALUES ('John', 'Doe', 'john@example.com')";
+
+if (mysqli_query($conn, $sql)) {
+ echo "New record created successfully";
+} else {
+ echo "Error: " . $sql . "<br>" . mysqli_error($conn);
+}
+
+mysqli_close($conn);
+?>
diff --git a/automated/linux/lamp/html/connect-db.php b/automated/linux/lamp/html/connect-db.php
new file mode 100644
index 0000000..ee42caf
--- /dev/null
+++ b/automated/linux/lamp/html/connect-db.php
@@ -0,0 +1,14 @@
+<?php
+$servername = "localhost";
+$username = "root";
+$password = "lamptest";
+
+// Create connection
+$conn = new mysqli($servername, $username, $password);
+
+// Check connection
+if ($conn->connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+echo "Connected successfully";
+?>
diff --git a/automated/linux/lamp/html/create-db.php b/automated/linux/lamp/html/create-db.php
new file mode 100644
index 0000000..63c166b
--- /dev/null
+++ b/automated/linux/lamp/html/create-db.php
@@ -0,0 +1,22 @@
+<?php
+$servername = "localhost";
+$username = "root";
+$password = "lamptest";
+
+// Create connection
+$conn = new mysqli($servername, $username, $password);
+// Check connection
+if ($conn->connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+// Create database
+$sql = "CREATE DATABASE myDB";
+if ($conn->query($sql) === TRUE) {
+ echo "Database created successfully";
+} else {
+ echo "Error creating database: " . $conn->error;
+}
+
+$conn->close();
+?>
diff --git a/automated/linux/lamp/html/create-table.php b/automated/linux/lamp/html/create-table.php
new file mode 100644
index 0000000..740676a
--- /dev/null
+++ b/automated/linux/lamp/html/create-table.php
@@ -0,0 +1,30 @@
+<?php
+$servername = "localhost";
+$username = "root";
+$password = "lamptest";
+$dbname = "myDB";
+
+// Create connection
+$conn = new mysqli($servername, $username, $password, $dbname);
+// Check connection
+if ($conn->connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+// sql to create table
+$sql = "CREATE TABLE MyGuests (
+id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
+firstname VARCHAR(30) NOT NULL,
+lastname VARCHAR(30) NOT NULL,
+email VARCHAR(50),
+reg_date TIMESTAMP
+)";
+
+if ($conn->query($sql) === TRUE) {
+ echo "Table MyGuests created successfully";
+} else {
+ echo "Error creating table: " . $conn->error;
+}
+
+$conn->close();
+?>
diff --git a/automated/linux/lamp/html/delete-record.php b/automated/linux/lamp/html/delete-record.php
new file mode 100644
index 0000000..8939c45
--- /dev/null
+++ b/automated/linux/lamp/html/delete-record.php
@@ -0,0 +1,24 @@
+<?php
+$servername = "localhost";
+$username = "root";
+$password = "lamptest";
+$dbname = "myDB";
+
+// Create connection
+$conn = new mysqli($servername, $username, $password, $dbname);
+// Check connection
+if ($conn->connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+// sql to delete a record
+$sql = "DELETE FROM MyGuests WHERE id=6";
+
+if ($conn->query($sql) === TRUE) {
+ echo "Record deleted successfully";
+} else {
+ echo "Error deleting record: " . $conn->error;
+}
+
+$conn->close();
+?>
diff --git a/automated/linux/lamp/html/index.html b/automated/linux/lamp/html/index.html
new file mode 100644
index 0000000..4529cd4
--- /dev/null
+++ b/automated/linux/lamp/html/index.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+
+<h1>Test Page for the Apache HTTP Server</h1>
+
+</body>
+</html>
diff --git a/automated/linux/lamp/html/info.php b/automated/linux/lamp/html/info.php
new file mode 100644
index 0000000..147cebc
--- /dev/null
+++ b/automated/linux/lamp/html/info.php
@@ -0,0 +1 @@
+<?php phpinfo(); ?>
diff --git a/automated/linux/lamp/html/select-record.php b/automated/linux/lamp/html/select-record.php
new file mode 100644
index 0000000..45505f3
--- /dev/null
+++ b/automated/linux/lamp/html/select-record.php
@@ -0,0 +1,26 @@
+<?php
+$servername = "localhost";
+$username = "root";
+$password = "lamptest";
+$dbname = "myDB";
+
+// Create connection
+$conn = new mysqli($servername, $username, $password, $dbname);
+// Check connection
+if ($conn->connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+$sql = "SELECT id, firstname, lastname FROM MyGuests";
+$result = $conn->query($sql);
+
+if ($result->num_rows > 0) {
+ // output data of each row
+ while($row = $result->fetch_assoc()) {
+ echo "id: " . $row["id"]. " - Name: " . $row["firstname"]. " " . $row["lastname"]. "<br>";
+ }
+} else {
+ echo "0 results";
+}
+$conn->close();
+?>
diff --git a/automated/linux/lamp/lamp.sh b/automated/linux/lamp/lamp.sh
new file mode 100755
index 0000000..2601e0b
--- /dev/null
+++ b/automated/linux/lamp/lamp.sh
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+. ../../lib/sh-test-lib
+OUTPUT="$(pwd)/output"
+RESULT_FILE="${OUTPUT}/result.txt"
+
+usage() {
+ echo "Usage: $0 [-s <true|false>]" 1>&2
+ exit 1
+}
+
+while getopts "s:" o; do
+ case "$o" in
+ s) SKIP_INSTALL="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+! check_root && error_msg "This script must be run as root"
+[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
+mkdir -p "${OUTPUT}"
+
+# Install lamp and use systemctl for service management. Tested on Ubuntu 16.04,
+# Debian 8, CentOS 7 and Fedora 24. systemctl should available on newer releases
+# as well.
+if [ "${SKIP_INSTALL}" = "True" ] || [ "${SKIP_INSTALL}" = "true" ]; then
+ warn_msg "LAMP package installation skipped"
+else
+ dist_name
+ case "${dist}" in
+ Debian|Ubuntu)
+ if [ "${dist}" = "Debian" ]; then
+ pkgs="apache2 mysql-server php5-mysql php5-common libapache2-mod-php5"
+ elif [ "${dist}" = "Ubuntu" ]; then
+ pkgs="apache2 mysql-server php-mysql php-common libapache2-mod-php"
+ fi
+ install_deps "curl ${pkgs}"
+ echo "extension=mysqli.so" >> /etc/php5/apache2/php.ini
+ systemctl restart apache2
+ systemctl restart mysql
+ ;;
+ CentOS|Fedora)
+ pkgs="httpd mariadb-server mariadb php php-mysql"
+ install_deps "curl ${pkgs}"
+ systemctl start httpd.service
+ systemctl start mariadb
+ ;;
+ *)
+ error_msg "Unsupported distribution!"
+ esac
+fi
+
+cp ./html/* /var/www/html/
+
+# Test Apache.
+curl -o "${OUPUT}/index.html" "http://localhost/index.html"
+grep "Test Page for the Apache HTTP Server" "${OUPUT}/index.html"
+check_return "apache2-test-page"
+
+# Test MySQL.
+mysqladmin -u root password lamptest
+mysql --user="root" --password="lamptest" -e "show databases"
+check_return "mysql-show-databases"
+
+# Test PHP.
+curl -o "${OUTPUT}/phpinfo.html" "http://localhost/info.php"
+grep "PHP Version" "${OUTPUT}/phpinfo.html"
+check_return "phpinfo"
+
+# PHP Connect to MySQL.
+curl -o "${OUTPUT}/connect-db" "http://localhost/connect-db.php"
+grep "Connected successfully" "${OUTPUT}/connect-db"
+exit_on_fail "php-connect-db"
+
+# PHP Create a MySQL Database.
+curl -o "${OUTPUT}/create-db" "http://localhost/create-db.php"
+grep "Database created successfully" "${OUTPUT}/create-db"
+check_return "php-create-db"
+
+# PHP Create MySQL table.
+curl -o "${OUTPUT}/create-table" "http://localhost/create-table.php"
+grep "Table MyGuests created successfully" "${OUTPUT}/create-table"
+check_return "php-create-table"
+
+# PHP add record to MySQL table.
+curl -o "${OUTPUT}/add-record" "http://localhost/add-record.php"
+grep "New record created successfully" "${OUTPUT}/add-record"
+check_return "php-add-record"
+
+# PHP select record from MySQL table.
+curl -o "${OUTPUT}/select-record" "http://localhost/select-record.php"
+grep "id: 1 - Name: John Doe" "${OUTPUT}/select-record"
+check_return "php-select-record"
+
+# PHP delete record from MySQL table.
+curl -o "${OUTPUT}/delete-record" "http://localhost/delete-record.php"
+grep "Record deleted successfully" "${OUTPUT}/delete-record"
+check_return "php-delete-record"
diff --git a/automated/linux/lamp/lamp.yaml b/automated/linux/lamp/lamp.yaml
new file mode 100644
index 0000000..fced5df
--- /dev/null
+++ b/automated/linux/lamp/lamp.yaml
@@ -0,0 +1,29 @@
+metadata:
+ format: Lava-Test Test Definition 1.0
+ name: lamp
+ description: "A LAMP stack is a group of open source software that is
+ typically installed together to enable a server to host
+ dynamic websites and web applications."
+ maintainer:
+ - chase.qi@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - centos
+ - fedora
+ scope:
+ - functional
+ devices:
+ - mustang
+ - overdrive
+ - d02
+ - d03
+
+params:
+ SKIP_INSTALL: "False"
+
+run:
+ steps:
+ - cd ./automated/linux/lamp/
+ - ./lamp.sh -s "${SKIP_INSTALL}"
+ - ../../utils/send-to-lava.sh ./output/result.txt
diff --git a/automated/linux/openjdk/openjdk-smoke.sh b/automated/linux/openjdk/openjdk-smoke.sh
new file mode 100755
index 0000000..7202a85
--- /dev/null
+++ b/automated/linux/openjdk/openjdk-smoke.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+. ../../lib/sh-test-lib
+OUTPUT="$(pwd)/output"
+RESULT_FILE="${OUTPUT}/result.txt"
+VERSION="8"
+
+usage() {
+ echo "Usage: $0 [-v <8|9>] [-s <true|false>]" 1>&2
+ exit 1
+}
+
+while getopts "v:s:" o; do
+ case "$o" in
+ v) VERSION="${OPTARG}" ;;
+ s) SKIP_INSTALL="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+! check_root && error_msg "You need to be root to run this script."
+[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
+mkdir -p "${OUTPUT}"
+
+if [ "${SKIP_INSTALL}" = "True" ] || [ "${SKIP_INSTALL}" = "true" ]; then
+ info_msg "JDK package installation skipped"
+else
+ dist_name
+ case "${dist}" in
+ Debian|Ubuntu) pkg="openjdk-${VERSION}-jdk" ;;
+ CentOS|Fedora) pkg="java-1.${VERSION}.0-openjdk-devel" ;;
+ *) error_msg "Unsupported distribution" ;;
+ esac
+ install_deps "${pkg}"
+ exit_on_fail "jdk${VERSION}-installation"
+fi
+
+# Set the specific version as default in case more than one jdk installed.
+for link in java javac; do
+ path="$(update-alternatives --display "${link}" \
+ | egrep "^/usr/lib/jvm/java-(${VERSION}|1.${VERSION}.0)" \
+ | awk '{print $1}')"
+ update-alternatives --set "${link}" "${path}"
+done
+
+java -version 2>&1 | grep "version \"1.${VERSION}"
+exit_on_fail "check-java-version"
+
+javac -version 2>&1 | grep "javac 1.${VERSION}"
+exit_on_fail "check-javac-version"
+
+cd "${OUTPUT}"
+cat > "HelloWorld.java" << EOL
+public class HelloWorld {
+ public static void main(String[] args) {
+ System.out.println("Hello, World");
+ }
+}
+EOL
+
+javac HelloWorld.java
+check_return "compile-HelloWorld"
+
+java HelloWorld | grep "Hello, World"
+check_return "execute-HelloWorld"
diff --git a/automated/linux/openjdk/openjdk-smoke.yaml b/automated/linux/openjdk/openjdk-smoke.yaml
new file mode 100644
index 0000000..74799ea
--- /dev/null
+++ b/automated/linux/openjdk/openjdk-smoke.yaml
@@ -0,0 +1,33 @@
+metadata:
+ format: Lava-Test Test Definition 1.0
+ name: openjdk-smoke-test
+ description: "Install openjdk, compile and run HelloWorld."
+ maintainer:
+ - milosz.wasilewski@linaro.org
+ - chase.qi@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - centos
+ - fedora
+ scope:
+ - functional
+ devices:
+ - juno
+ - hi6220-hikey
+ - apq8016-sbc
+ - mustang
+ - d02
+ - d03
+ - overdrive
+
+params:
+ # Specify JDK vesion.
+ VERSION: 8
+ SKIP_INSTALL: "False"
+
+run:
+ steps:
+ - cd ./automated/linux/openjdk/
+ - ./openjdk-smoke.sh -v "${VERSION}" -s "${SKIP_INSTALL}"
+ - ../../utils/send-to-lava.sh ./output/result.txt
diff --git a/automated/linux/usb-smoke/usb-smoke-test.sh b/automated/linux/usb-smoke/usb-smoke-test.sh
new file mode 100755
index 0000000..6650b04
--- /dev/null
+++ b/automated/linux/usb-smoke/usb-smoke-test.sh
@@ -0,0 +1,108 @@
+#!/bin/bash
+#
+# USB smoke test cases
+#
+# Copyright (C) 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: Chase Qi <chase.qi@linaro.org>
+# Author: Naresh Kamboju <naresh.kamboju@linaro.org>
+#
+
+. ../../lib/sh-test-lib
+OUTPUT="$(pwd)/output"
+RESULT_FILE="${OUTPUT}/result.txt"
+STATUS=0
+
+usage() {
+ echo "Usage: $0 [-s <true>]" 1>&2
+ exit 1
+}
+
+while getopts "s:" o; do
+ case "$o" in
+ s) SKIP_INSTALL="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+increment_return_status() {
+ local exit_code="$?"
+ [ "$#" -ne 1 ] && error_msg "Usage: increment_return_status value"
+ local value="$1"
+ return $(expr "${exit_code}" + "${value}")
+}
+
+# Get the usb devices/hubs list
+list_all_usb_devices() {
+ info_msg "Running list-all-usb-devices test..."
+ lsusb
+ exit_on_fail "lsusb"
+}
+
+# Examine all usb devices/hubs
+examine_all_usb_devices() {
+ info_msg "Running examine_all_usb_devices test..."
+ USB_BUS="/dev/bus/usb/"
+ if [ -d "${USB_BUS}" ]; then
+ for bus in $(ls "${USB_BUS}"); do
+ for device in $(ls "${USB_BUS}""${bus}"/); do
+ info_msg "USB Bus "${bus}", device "${device}""
+ lsusb -D "${USB_BUS}""${bus}"/"${device}"
+ increment_return_status "${STATUS}"
+ STATUS=$?
+ done
+ done
+ if [ "${STATUS}" -ne 0 ]; then
+ report_fail "examine-all-usb-devices"
+ else
+ report_pass "examine-all-usb-devices"
+ fi
+ else
+ report_fail "examine-all-usb-devices"
+ fi
+}
+
+# Print supported usb protocols
+print_supported_usb_protocols() {
+ info_msg "Running print-supported-usb-protocols test..."
+ lsusb -v | grep -i bcdusb
+ check_return "print-supported-usb-protocols"
+}
+
+# Print supported usb speeds
+print_supported_usb_speeds() {
+ info_msg "Running print-supported-usb-speeds test..."
+ lsusb -t
+ check_return "print-supported-usb-speeds"
+}
+
+# Test run.
+! check_root && error_msg "This script must be run as root"
+[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
+mkdir -p "${OUTPUT}"
+
+info_msg "About to run USB test..."
+info_msg "Output directory: ${OUTPUT}"
+
+# Install usbutils package
+pkgs="usbutils"
+install_deps "${pkgs}" "${SKIP_INSTALL}"
+
+list_all_usb_devices
+examine_all_usb_devices
+print_supported_usb_protocols
+print_supported_usb_speeds
diff --git a/automated/linux/usb-smoke/usb-smoke-test.yaml b/automated/linux/usb-smoke/usb-smoke-test.yaml
new file mode 100644
index 0000000..9c2386b
--- /dev/null
+++ b/automated/linux/usb-smoke/usb-smoke-test.yaml
@@ -0,0 +1,37 @@
+metadata:
+ format: Lava-Test Test Definition 1.0
+ name: usb-test-basic
+ description: "Basic USB test for Linaro Ubuntu images. The test examines all available USB devices
+ and prints supported USB protocols and speed."
+ maintainer:
+ - chase.qi@linaro.org
+ - naresh.kamboju@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - centos
+ - fedora
+ scope:
+ - functional
+ devices:
+ - panda
+ - panda-es
+ - arndale
+ - vexpress-tc2
+ - beaglebone-black
+ - juno
+ - hi6220-hikey
+ - apq8016-sbc
+ - mustang
+ - overdrive
+ - d02
+ - d03
+
+params:
+ SKIP_INSTALL: "false"
+
+run:
+ steps:
+ - cd ./automated/linux/usb-smoke
+ - ./usb-smoke-test.sh -s "${SKIP_INSTALL}"
+ - ../../utils/send-to-lava.sh ./output/result.txt
diff --git a/openembedded/pwrmgmt.yaml b/openembedded/pwrmgmt.yaml
index 1718f41..41a54a1 100644
--- a/openembedded/pwrmgmt.yaml
+++ b/openembedded/pwrmgmt.yaml
@@ -27,7 +27,7 @@ install:
params:
PWR_TESTARG: cpufreq cpuidle cpuhotplug thermal cputopology
- RELEASE: 'pm-qa-v0.5.1'
+ RELEASE: 'pm-qa-v0.5.2'
run:
steps:
diff --git a/ubuntu/pwrmgmt.yaml b/ubuntu/pwrmgmt.yaml
index f1f170b..fee5253 100644
--- a/ubuntu/pwrmgmt.yaml
+++ b/ubuntu/pwrmgmt.yaml
@@ -36,7 +36,7 @@ install:
params:
PWR_TESTARG: cpufreq cpuidle cpuhotplug thermal cputopology
- RELEASE: 'pm-qa-v0.5.1'
+ RELEASE: 'pm-qa-v0.5.2'
run:
steps:
diff --git a/ubuntu/start-kvm.yaml b/ubuntu/start-kvm.yaml
index 72b4df7..992ce4b 100644
--- a/ubuntu/start-kvm.yaml
+++ b/ubuntu/start-kvm.yaml
@@ -50,5 +50,3 @@ run:
- lava-sync clients
- 'cat *.txt'
-parse:
- pattern: '^(?P<test_case_id>[^:]+):\s*(?P<measurement>[0-9.]+)\s+(?P<units>\w+)\s+(?P<result>\w+)'
diff --git a/ubuntu/stop-guest.yaml b/ubuntu/stop-guest.yaml
new file mode 100644
index 0000000..a2d9405
--- /dev/null
+++ b/ubuntu/stop-guest.yaml
@@ -0,0 +1,22 @@
+metadata:
+ name: guest-complete
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Signal tests inside guest complete"
+ maintainer:
+ - riku.voipio@linaro.org
+ scope:
+ - functional
+ - virtualization
+ os:
+ - ubuntu
+ devices:
+ - arndale
+ - vexpress-tc2
+ - mustang
+ - midway
+ - juno
+
+run:
+ steps:
+ - lava-sync clients
+