[v3,3/5] scripts: Remove vm_smoke_test

Message ID 20240621150814.189288-4-amikan@ilbers.de
State Accepted, archived
Headers show
Series Remove code duplications for start_vm | expand

Commit Message

Anton Mikanovich June 21, 2024, 3:08 p.m. UTC
From: Ilia Skochilov <iskochilov@ilbers.de>

Remove vm_smoke_test, its functionality is now covered in the dev
testsuite. Remove mentioning of vm_smoke_test in documentation.
Add instructions about how to run the dev testsuite via avocado
framework in a kas container.

Signed-off-by: Ilia Skochilov <iskochilov@ilbers.de>
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 CONTRIBUTING.md       |  50 +++++++++++---------
 scripts/vm_smoke_test | 106 ------------------------------------------
 2 files changed, 28 insertions(+), 128 deletions(-)
 delete mode 100755 scripts/vm_smoke_test

Patch

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9ad6bf3b..f932417b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -80,28 +80,34 @@  Plan merges to `master` so that both fit the two-week window; short extensions s
    * It's highly suggested to test your patchset before submitting it to the mailing
      by launching CI tests scripts. The procedure is described below:
 
-    First, run "fast" CI
-```
-     scripts/ci_build.sh -q -f
-     ...
-     source isar-init-build-env
-     scripts/vm_smoke_test -f
-```
-    Currently "fast" CI launches
-     * parallel cross build of QEMU arm/arm64/amd64 Debian stretch and Raspberry Pi 1 Raspbian stretch targets
-     * cross build of one of the supported boards which includes compilation of Linux kernel/U-Boot for it
-     * Launches login prompt check tests for built QEMU targets
-
-    Second, run standard CI
-```
-     scripts/ci_build.sh -q
-     ...
-     source isar-init-build-env
-     scripts/vm_smoke_test -q
-```
-    Currently standard CI launches
-     * parallel native build of QEMU arm/arm64/i386/amd64 Debian stretch/buster and Raspberry Pi 1 Raspbian stretch targets
-     * Launches login prompt check tests for built QEMU targets
+    git clone https://github.com/siemens/kas
+    cat > kas.yml <<EOF
+    header:
+      version: 12
+      build_system: isar
+    repos:
+      isar:
+        url: "http://github.com:/ilbers/isar"
+        refspec: master
+        layers:
+          meta:
+          meta-isar:
+    EOF
+    kas/kas-container shell kas.yml
+
+    In kas shell:
+
+    ```
+    wget -q http://deb.isar-build.org/debian-isar.key -O- |gpg --dearmor \
+        |sudo dd of=/etc/apt/trusted.gpg.d/debian-isar.gpg
+    echo "deb [signed-by=/etc/apt/trusted.gpg.d/debian-isar.gpg] \
+        http://deb.isar-build.org/debian-isar bookworm-isar main" \
+        |sudo /etc/apt/sources.list.d/10-isar_build.list
+    sudo apt-get update
+    sudo apt-get install avocado
+    cd /work/isar/testsuite
+    avocado run citest.py -t dev --max-parallel-tasks=1
+    ```
 
     Active developers may request from maintainers an account on isar-build.org
     to analyze CI logs or to launch their own CI builds there.
diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test
deleted file mode 100755
index f69b05c2..00000000
--- a/scripts/vm_smoke_test
+++ /dev/null
@@ -1,106 +0,0 @@ 
-#!/bin/sh
-#
-# This software is a part of ISAR.
-# Copyright (C) 2015-2018 ilbers GmbH
-
-set -e
-
-VERBOSE="--show=test"
-TIMEOUT=300
-
-# Error codes:
-ES_OK=0
-ES_FAIL=1
-ES_BUG=3
-
-RET=$ES_FAIL
-
-# Get Avocado QEMU tests path
-TESTSUITE_DIR="$(dirname "$0")/../testsuite"
-
-# Go to Isar root
-cd "$(dirname "$0")/.."
-
-BUILD_DIR=./build
-
-show_help() {
-    echo "This script tests the Isar images for default targets in QEMU."
-    echo
-    echo "Usage:"
-    echo "    $0 [params]"
-    echo
-    echo "Parameters:"
-    echo "    -f,--fast             test reduced set of supported targets."
-    echo "    -q, --quiet           do not display boot logs for all the targets."
-    echo "                          If test failed for the specific configuration,"
-    echo "                          the respective boot log will be printed anyway."
-    echo "    -t,--timeout SEC      specify time in seconds to wait before stop QEMU."
-    echo "                          The default is: 300"
-    echo "    -h, --help            display this message and exit."
-    echo
-    echo "Exit status:"
-    echo " 0  if OK,"
-    echo " 1  if test failed,"
-    echo " 3  if invalid parameters are passed."
-}
-
-# Parse command line to get user configuration
-while [ $# -gt 0 ]
-do
-    key="$1"
-
-    case $key in
-    -h|--help)
-        show_help
-        exit 0
-        ;;
-    -o|--output)
-        # Deprecated option
-        shift
-        ;;
-    -p|--pid-file)
-        # Deprecated option
-        shift
-        ;;
-    -f|--fast)
-        FAST_BUILD="1"
-        ;;
-    -q|--quiet)
-        VERBOSE=""
-        ;;
-    -t|--timeout)
-        TIMEOUT=$2
-        shift
-        ;;
-    *)
-        echo "error: invalid parameter '$key', please try '--help' to get list of supported parameters"
-        exit $ES_BUG
-        ;;
-    esac
-
-    shift
-done
-
-TAGS="full"
-if [ -n "$FAST_BUILD" ]; then
-    TAGS="fast"
-fi
-
-# Provide working path
-mkdir -p .config/avocado
-cat <<EOF > .config/avocado/avocado.conf
-[datadir.paths]
-base_dir = $BUILD_DIR/
-test_dir = $BUILD_DIR/tests
-data_dir = $BUILD_DIR/data
-logs_dir = $BUILD_DIR/job-results
-EOF
-export VIRTUAL_ENV="./"
-
-if avocado $VERBOSE run "$TESTSUITE_DIR/citest.py" -t $TAGS,startvm \
-    --test-runner=runner --disable-sysinfo \
-    -p build_dir="$BUILD_DIR" -p time_to_wait=$TIMEOUT; then
-    RET=$ES_OK
-fi
-
-exit $RET