From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7075593626590380032 X-Received: by 2002:a05:6402:1cc1:b0:413:2cfb:b6ca with SMTP id ds1-20020a0564021cc100b004132cfbb6camr28332213edb.265.1647415020153; Wed, 16 Mar 2022 00:17:00 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:907:75fa:b0:6cb:c540:501 with SMTP id jz26-20020a17090775fa00b006cbc5400501ls639247ejc.11.gmail; Wed, 16 Mar 2022 00:16:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpeeyICGikdPmxMJ7pdmSN05sGMv+JNLcttlMWhZ8Vzi7PSy67D6lnEMiGhF/dfq24uUsh X-Received: by 2002:a17:906:c18c:b0:6d5:8518:e567 with SMTP id g12-20020a170906c18c00b006d58518e567mr24898006ejz.37.1647415018886; Wed, 16 Mar 2022 00:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647415018; cv=none; d=google.com; s=arc-20160816; b=RRanYld055mFaiDjc6GOTQBWsCQcIFfjbribGgtIezg9b5kLFLr65S6OdGUfqAs9OQ GoFbdSGKMA/1mvuioZ/kxfRjQoOeqLu0ouK/DecpOUh3DW+OWax6tHvGcYl6gUlaBkYI 5JcS+eyM2ThbqlFIlJd7cFW7M1iWz+1GflK3mZh855EpZlppIrVVhj8KX/J6XlU7pwFb OgCWJ0DpqWwq8DScmH1pK//WGVLbegAisGFzhpn428mJTpUZ9Ms4sxP8eHXJfZ9pQddP NSmZQdsQN/x4635856zWqPblaSnrpAg1Iwitv4sBPbCsR1s8dHliXj3ekaYzX5WZ3Y8C 7tdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=6szTNsULS1Mnue6S4btxoW1Rqq/ae6+p10quyNnlUrg=; b=E5qmHLrEIpF9PKdy2RMAzPyntMc/QYFYmBGshN0M/0lz6Kz/zZCRRaCmkDhZI+NZzh GI2VI7mjdshIov7HUXJrcDJfS8udKeOCP4p8zxim6Eg3cRMdjmFUfPCoPNKOKOLMsmVT 4TN4NNTv9UQH+4WWoOuJFp8Bmd3v/7VAND4vNvBmgJJ2WZeKrfrWAdTxr7wkqma+I3KZ dNy8fOs0PI12XIAqgE8qeV5V6zvu8Xzy87qpAaHQBKkVuK77R0CWT9iU63pN7q1+wGDk Tn+GAux0VylWg8wUFtTRrUcvQBiZk15frANsIwKs+yjbQuU0b5OBrVAp665ueE2lKaZf AAmw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id r16-20020aa7cb90000000b00410871504d8si75613edt.0.2022.03.16.00.16.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Mar 2022 00:16:58 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from localhost.localdomain (mm-14-51-214-37.mgts.dynamic.pppoe.byfly.by [37.214.51.14] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 22G7GtBL021311 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Mar 2022 08:16:57 +0100 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v3 1/7] CI: Reorganize testsuite folders Date: Wed, 16 Mar 2022 10:16:41 +0300 Message-Id: <20220316071647.8919-2-amikan@ilbers.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220316071647.8919-1-amikan@ilbers.de> References: <20220316071647.8919-1-amikan@ilbers.de> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: w/gRNtko91ve Move all tests into one directory to be able to unify them. Signed-off-by: Anton Mikanovich --- 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 dbf4d3a..0281be4 --- 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.17.1