diff --git a/daily_tests/daily_scl_tests.sh b/daily_tests/daily_scl_tests.sh index b7adaec..894304f 100755 --- a/daily_tests/daily_scl_tests.sh +++ b/daily_tests/daily_scl_tests.sh @@ -5,13 +5,17 @@ set -x SCL_CONTAINERS_UPSTREAM="\ s2i-nodejs-container " -SCL_CONTAINERS="\ + +SCL_S2I_CONTAINERS="\ s2i-base-container s2i-nodejs-container s2i-php-container s2i-perl-container s2i-ruby-container s2i-python-container +" + +SCL_NOS2I_CONTAINTERS="\ varnish-container nginx-container httpd-container @@ -26,7 +30,9 @@ TARGET="$1" shift [[ -z "$1" ]] && { echo "You have to specify type of the test to run. test, test-openshift, test-openshift-pytest, test-openshift-4" && exit 1 ; } TESTS="$1" - +shift +[[ -z "$1" ]] && { echo "You have to specify type of images S2I or NOS2I" && exit 1 ; } +SET_TEST="$1" CUR_WD=$(pwd) echo "Current working directory is: ${CUR_WD}" @@ -37,11 +43,6 @@ KUBEPASSWD=/root/.kube/ocp-kube mkdir -p "${RESULT_DIR}" -function start_ocp3() { - cd /root/container-common-scripts || exit 1 - bash test-lib-openshift.sh ct_os_cluster_up -} - function clone_repo() { local repo_name=$1; shift # Sometimes cloning failed with an error @@ -69,11 +70,14 @@ function clean_ocp4() { } function iterate_over_all_containers() { - CONTAINTERS_TO_TEST=$SCL_CONTAINERS + CONTAINTERS_TO_TEST=$SCL_S2I_CONTAINERS if [[ "${TESTS}" == "test-upstream" ]]; then CONTAINTERS_TO_TEST=$SCL_CONTAINERS_UPSTREAM + elif [[ "${SET_TEST}" == "NOS2I" ]]; then + CONTAINTERS_TO_TEST=$SCL_NOS2I_CONTAINTERS fi + for repo in ${CONTAINTERS_TO_TEST}; do # Do not shutting down OpenShift 3 cluster export OS_CLUSTER_STARTED_BY_TEST=0 diff --git a/prepare_machine.sh b/prepare_machine.sh new file mode 100755 index 0000000..cc9b18d --- /dev/null +++ b/prepare_machine.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -x + +LOGS_DIR="/home/fedora/logs" +DAILY_TEST_DIR="/var/tmp/daily_scl_tests" +WORK_DIR=$(mktemp -d -p "/var/tmp") + +if [ -d "${DAILY_TEST_DIR}" ]; then + rm -rf "${DAILY_TEST_DIR}" +fi + +if [ -d "${WORK_DIR}" ]; then + rm -rf "${WORK_DIR}" +fi + +if [ -d "${LOGS_DIR}" ]; then + rm -rf "${LOGS_DIR}" +fi diff --git a/run_nightly_tests.sh b/run_nightly_tests.sh index f071688..56a49f8 100755 --- a/run_nightly_tests.sh +++ b/run_nightly_tests.sh @@ -19,7 +19,7 @@ if [[ "$TARGET" == "rhel8" ]]; then elif [[ "$TARGET" == "rhel9" ]]; then COMPOSE="1MT-RHEL-9.4.0-updates" elif [[ "$TARGET" == "fedora" ]]; then - COMPOSE="1MT-Fedora-39" + COMPOSE="1MT-Fedora-41" TMT_REPO="https://github.com/sclorg/sclorg-testing-farm" TMT_DIR="sclorg-testing-farm" TFT_PLAN="nightly-container-f" @@ -57,10 +57,7 @@ if [[ ! -d "${LOGS_DIR}" ]]; then mkdir -p "${LOGS_DIR}" fi COMPOSE=$(tmt -q run provision -h minute --list-images | grep $COMPOSE | head -n 1 | tr -d '[:space:]') -echo "COMPOSE is $COMPOSE" | tee -a ${LOG} -if [ -d "${DAILY_TEST_DIR}/${TARGET}-$TESTS" ]; then - rm -rf "${DAILY_TEST_DIR}/${TARGET}-$TESTS" -fi + mkdir -p "${DAILY_TEST_DIR}/${TARGET}-$TESTS" LOG="${LOGS_DIR}/$TARGET-$TESTS.log" date > "${LOG}"