From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 1/6] CI: Reorganize testsuite folders
Date: Tue, 22 Feb 2022 10:12:54 +0300 [thread overview]
Message-ID: <20220222071259.157349-2-amikan@ilbers.de> (raw)
In-Reply-To: <20220222071259.157349-1-amikan@ilbers.de>
Move all tests into one directory to be able to unify them.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
scripts/ci_build.sh | 4 +--
scripts/vm_smoke_test | 4 +--
testsuite/README.md | 26 +++++++++++++++++---
testsuite/{build_test => }/build_test.py | 0
testsuite/build_test/run_fast.sh | 3 ---
testsuite/build_test/run_full.sh | 3 ---
testsuite/{build_test => }/cibase.py | 4 +--
testsuite/{build_test => }/cibuilder.py | 2 +-
testsuite/{ => keys}/base-apt/test_priv.key | 0
testsuite/{ => keys}/base-apt/test_pub.key | 0
testsuite/{vm_boot_test => }/vm_boot_test.py | 1 -
testsuite/vm_boot_test/run_fast.sh | 3 ---
testsuite/vm_boot_test/run_full.sh | 3 ---
13 files changed, 30 insertions(+), 23 deletions(-)
rename testsuite/{build_test => }/build_test.py (100%)
mode change 100644 => 100755
delete mode 100755 testsuite/build_test/run_fast.sh
delete mode 100755 testsuite/build_test/run_full.sh
rename testsuite/{build_test => }/cibase.py (97%)
mode change 100644 => 100755
rename testsuite/{build_test => }/cibuilder.py (99%)
mode change 100644 => 100755
rename testsuite/{ => keys}/base-apt/test_priv.key (100%)
rename testsuite/{ => keys}/base-apt/test_pub.key (100%)
rename testsuite/{vm_boot_test => }/vm_boot_test.py (98%)
mode change 100644 => 100755
delete mode 100755 testsuite/vm_boot_test/run_fast.sh
delete mode 100755 testsuite/vm_boot_test/run_full.sh
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 339ebca..fe139d1 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -25,7 +25,7 @@ if ! command -v avocado > /dev/null; then
fi
# Get Avocado build tests path
-BUILD_TEST_DIR="$(pwd)/testsuite/build_test"
+TESTSUITE_DIR="$(pwd)/testsuite"
# Start tests in current path by default
BASE_DIR=./build
@@ -127,6 +127,6 @@ export VIRTUAL_ENV="./"
# the real stuff starts here, trace commands from now on
set -x
-avocado $VERBOSE run "$BUILD_TEST_DIR/build_test.py" \
+avocado $VERBOSE run "$TESTSUITE_DIR/build_test.py" \
-t $TAGS --test-runner=runner --disable-sysinfo \
-p quiet=$QUIET -p cross=$CROSS_BUILD
diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test
index 6416250..50051a7 100755
--- a/scripts/vm_smoke_test
+++ b/scripts/vm_smoke_test
@@ -14,7 +14,7 @@ ES_BUG=3
RET=$ES_FAIL
# Get Avocado QEMU tests path
-VM_TEST_DIR="$(dirname "$0")/../testsuite/vm_boot_test"
+TESTSUITE_DIR="$(dirname "$0")/../testsuite"
# Go to Isar root
cd "$(dirname "$0")/.."
@@ -95,7 +95,7 @@ logs_dir = $BUILD_DIR/job-results
EOF
export VIRTUAL_ENV="./"
-if avocado $VERBOSE run "$VM_TEST_DIR/vm_boot_test.py" -t $TAGS \
+if avocado $VERBOSE run "$TESTSUITE_DIR/vm_boot_test.py" -t $TAGS \
--test-runner=runner --disable-sysinfo \
-p build_dir="$BUILD_DIR" -p time_to_wait=$TIMEOUT; then
RET=$ES_OK
diff --git a/testsuite/README.md b/testsuite/README.md
index fcbea1e..b83a8f9 100644
--- a/testsuite/README.md
+++ b/testsuite/README.md
@@ -10,9 +10,29 @@ The framework could be installed by using standard HOWTO:
# Run test
-Each testsuite directory contains:
- - run_*.sh - script to start tests
- - *.py - test case
+## Fast build test
+
+```
+$ avocado run build_test.py -t fast -p quiet=1 -p cross=1
+```
+
+## Full build test
+
+```
+$ avocado run build_test.py -t full -p quiet=1
+```
+
+## Fast boot test
+
+```
+$ avocado run vm_boot_test.py -t fast -p build_dir="$BUILDDIR" -p time_to_wait=300
+```
+
+## Full boot test
+
+```
+$ avocado run vm_boot_test.py -t full -p build_dir="$BUILDDIR" -p time_to_wait=300
+```
# Other
diff --git a/testsuite/build_test/build_test.py b/testsuite/build_test.py
old mode 100644
new mode 100755
similarity index 100%
rename from testsuite/build_test/build_test.py
rename to testsuite/build_test.py
diff --git a/testsuite/build_test/run_fast.sh b/testsuite/build_test/run_fast.sh
deleted file mode 100755
index 4d1bf44..0000000
--- a/testsuite/build_test/run_fast.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-avocado run build_test.py -t fast -p quiet=1 -p cross=1
diff --git a/testsuite/build_test/run_full.sh b/testsuite/build_test/run_full.sh
deleted file mode 100755
index af5ec59..0000000
--- a/testsuite/build_test/run_full.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-avocado run build_test.py -t full -p quiet=1
diff --git a/testsuite/build_test/cibase.py b/testsuite/cibase.py
old mode 100644
new mode 100755
similarity index 97%
rename from testsuite/build_test/cibase.py
rename to testsuite/cibase.py
index ae03aa7..35d3c65
--- a/testsuite/build_test/cibase.py
+++ b/testsuite/cibase.py
@@ -18,8 +18,8 @@ class CIBaseTest(CIBuilder):
self.bitbake(targets, **kwargs)
def perform_repro_test(self, targets, signed=False, **kwargs):
- gpg_pub_key = os.path.dirname(__file__) + '/../base-apt/test_pub.key'
- gpg_priv_key = os.path.dirname(__file__) + '/../base-apt/test_priv.key'
+ gpg_pub_key = os.path.dirname(__file__) + '/../keys/base-apt/test_pub.key'
+ gpg_priv_key = os.path.dirname(__file__) + '/../keys/base-apt/test_priv.key'
self.configure(gpg_pub_key=gpg_pub_key if signed else None, **kwargs)
diff --git a/testsuite/build_test/cibuilder.py b/testsuite/cibuilder.py
old mode 100644
new mode 100755
similarity index 99%
rename from testsuite/build_test/cibuilder.py
rename to testsuite/cibuilder.py
index 2cfb6ec..f0c4bc3
--- a/testsuite/build_test/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -10,7 +10,7 @@ from avocado import Test
from avocado.utils import path
from avocado.utils import process
-isar_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
+isar_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
backup_prefix = '.ci-backup'
app_log = logging.getLogger("avocado.app")
diff --git a/testsuite/base-apt/test_priv.key b/testsuite/keys/base-apt/test_priv.key
similarity index 100%
rename from testsuite/base-apt/test_priv.key
rename to testsuite/keys/base-apt/test_priv.key
diff --git a/testsuite/base-apt/test_pub.key b/testsuite/keys/base-apt/test_pub.key
similarity index 100%
rename from testsuite/base-apt/test_pub.key
rename to testsuite/keys/base-apt/test_pub.key
diff --git a/testsuite/vm_boot_test/vm_boot_test.py b/testsuite/vm_boot_test.py
old mode 100644
new mode 100755
similarity index 98%
rename from testsuite/vm_boot_test/vm_boot_test.py
rename to testsuite/vm_boot_test.py
index f8c655c..6c4e979
--- a/testsuite/vm_boot_test/vm_boot_test.py
+++ b/testsuite/vm_boot_test.py
@@ -8,7 +8,6 @@ import time
import tempfile
from os.path import dirname
-sys.path.append(dirname(__file__) + '/..')
import start_vm
diff --git a/testsuite/vm_boot_test/run_fast.sh b/testsuite/vm_boot_test/run_fast.sh
deleted file mode 100755
index 0fc77b3..0000000
--- a/testsuite/vm_boot_test/run_fast.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-avocado run vm_boot_test.py -t fast -p build_dir="$BUILDDIR" -p time_to_wait=300
diff --git a/testsuite/vm_boot_test/run_full.sh b/testsuite/vm_boot_test/run_full.sh
deleted file mode 100755
index a561a36..0000000
--- a/testsuite/vm_boot_test/run_full.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-avocado run vm_boot_test.py -t full -p build_dir="$BUILDDIR" -p time_to_wait=300
--
2.25.1
next prev parent reply other threads:[~2022-02-22 7:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 7:12 [PATCH 0/6] Unify build and run test cases Anton Mikanovich
2022-02-22 7:12 ` Anton Mikanovich [this message]
2022-02-22 7:12 ` [PATCH 2/6] CI: Migrate all tests to one location Anton Mikanovich
2022-02-22 7:12 ` [PATCH 3/6] CI: Adopt vm_start test logging Anton Mikanovich
2022-02-22 7:12 ` [PATCH 4/6] CI: Do not run QEMU start tests from Gitlab Anton Mikanovich
2022-02-22 7:12 ` [PATCH 5/6] CI: Rename build_test.py to citest.py Anton Mikanovich
2022-02-22 7:12 ` [PATCH 6/6] CI: Change QEMU boot logs format Anton Mikanovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220222071259.157349-2-amikan@ilbers.de \
--to=amikan@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox