qa-testdefinitions: add yaml and script for agl extend test 99/28099/2
authorduerpei <duep.fnst@fujitsu.com>
Sat, 6 Aug 2022 03:47:36 +0000 (11:47 +0800)
committerduerpei <duep.fnst@fujitsu.com>
Sat, 6 Aug 2022 03:47:36 +0000 (11:47 +0800)
In qa-testdefinitions, add lava testdefinition (yaml+script)
for agl extend test

Bug-AGL: SPEC-4345

Signed-off-by: duerpei <duep.fnst@fujitsu.com>
Change-Id: I2df480b5e880c62868c17192c827e8f7ccc2a749

common/scripts/agl-extend-test.sh [new file with mode: 0755]
test-suites/release/agl-extend-test.yaml [new file with mode: 0644]

diff --git a/common/scripts/agl-extend-test.sh b/common/scripts/agl-extend-test.sh
new file mode 100755 (executable)
index 0000000..fd3a4f8
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+pre_check=`which agl-test`
+
+if [ -n "$pre_check" ] ; then
+    agl-test
+    echo "agl-extend-test is present"
+else
+    echo "agl-test is not installed, abort this test"
+    exit 127
+fi
+
+
+if [ -x ./artiproxy-upload.sh ] ; then
+    LOG_DIR=/var/run/agl-test/logs/log-to-report
+    ZIP_FILE=`ls ${LOG_DIR} | grep agl-test-log*`
+
+    if [ -z $ZIP_FILE ] ; then
+        echo "Cannot find agl-extend-test log"
+        exit 1
+    fi
+
+    ./artiproxy-upload.sh $LOG_DIR $ZIP_FILE
+    if [ $? -eq 1 ] ; then
+        echo "Upload of ${ZIP_FILE} failed"
+        exit 1
+    else
+        echo "Upload of test report successful"
+        exit 0
+    fi
+
+else
+    echo "The file artiproxy-upload.sh does not exist"
+    exit 126
+fi
diff --git a/test-suites/release/agl-extend-test.yaml b/test-suites/release/agl-extend-test.yaml
new file mode 100644 (file)
index 0000000..ba90dec
--- /dev/null
@@ -0,0 +1,17 @@
+metadata:
+    name: agl-extend-test
+    format: "Lava-Test-Shell Test Definition 1.0"
+    description: "Extend tests for agl release"
+    maintainer:
+        - duep.fnst@fujitsu.com
+    os:
+        - openembedded
+    scope:
+        - functional
+params:
+  DEVICE_TAGS: ""
+
+run:
+    steps:
+        - "cd common/scripts"
+        - "./agl-extend-test.sh"