diff options
Diffstat (limited to 'contrib/cirrus')
-rw-r--r-- | contrib/cirrus/lib.sh | 8 | ||||
-rwxr-xr-x | contrib/cirrus/logformatter | 10 | ||||
-rwxr-xr-x | contrib/cirrus/pr-should-include-tests | 2 | ||||
-rwxr-xr-x | contrib/cirrus/runner.sh | 24 | ||||
-rwxr-xr-x | contrib/cirrus/setup_environment.sh | 11 |
5 files changed, 34 insertions, 21 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index 451a267b3..2cd28e34a 100644 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -13,8 +13,12 @@ set -a _waserrexit=0 if [[ "$SHELLOPTS" =~ errexit ]]; then _waserrexit=1; fi set +e # Assumed in F33 for setting global vars -source /etc/profile -source /etc/environment +if [[ -r "/etc/automation_environment" ]]; then + source /etc/automation_environment +else # prior to automation library v2.0, this was necessary + source /etc/profile + source /etc/environment +fi if [[ -r "/etc/ci_environment" ]]; then source /etc/ci_environment; fi USER="$(whoami)" HOME="$(getent passwd $USER | cut -d : -f 6)" diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter index 3fa0e5618..5156f9f8a 100755 --- a/contrib/cirrus/logformatter +++ b/contrib/cirrus/logformatter @@ -243,11 +243,17 @@ END_HTML $cirrus_task = $1; } - # BATS handling (used also for apiv2 tests, which emit TAP output) - if ($line =~ /^1\.\.(\d+)$/ || $line =~ m!/test-apiv2!) { + # BATS handling. This will recognize num_tests both at start and end + if ($line =~ /^1\.\.(\d+)$/) { $looks_like_bats = 1; $bats_count{expected_total} = $1; } + # Since the number of tests can't always be predicted, recognize + # some leading text strings that indicate BATS output to come. + elsif ($line =~ /^TAP\s+version\s/ || $line =~ m!/test-apiv2!) { + $looks_like_bats = 1; + $bats_count{expected_total} = -1; # Expect to be overridden at end! + } if ($looks_like_bats) { my $css; diff --git a/contrib/cirrus/pr-should-include-tests b/contrib/cirrus/pr-should-include-tests index e3c5d5da1..9ccac17a3 100755 --- a/contrib/cirrus/pr-should-include-tests +++ b/contrib/cirrus/pr-should-include-tests @@ -33,6 +33,8 @@ fi filtered_changes=$(git diff --name-status $base $head | awk '{print $2}' | fgrep -vx .cirrus.yml | + fgrep -vx .gitignore | + fgrep -vx Makefile | fgrep -vx changelog.txt | fgrep -vx go.mod | fgrep -vx go.sum | diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index f52e107cc..b463745d1 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -202,8 +202,7 @@ function _run_build() { # Ensure always start from clean-slate with all vendor modules downloaded make clean make vendor - make podman-release - make podman-remote-linux-release + make podman-release.tar.gz # includes podman, podman-remote, and docs } function _run_altbuild() { @@ -219,7 +218,7 @@ function _run_altbuild() { make build-all-new-commits GIT_BASE_BRANCH=origin/$DEST_BRANCH ;; *Windows*) - make podman-remote-windows-release + make podman-remote-release-windows.zip make podman.msi ;; *Without*) @@ -269,13 +268,18 @@ function _run_release() { } logformatter() { - # Use similar format as human-friendly task name from .cirrus.yml - # shellcheck disable=SC2154 - output_name="$TEST_FLAVOR-$PODBIN_NAME-$DISTRO_NV-$PRIV_NAME-$TEST_ENVIRON" - # Requires stdin and stderr combined! - cat - \ - |& awk --file "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk" \ - |& "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/logformatter" "$output_name" + if [[ "$CI" == "true" ]]; then + # Use similar format as human-friendly task name from .cirrus.yml + # shellcheck disable=SC2154 + output_name="$TEST_FLAVOR-$PODBIN_NAME-$DISTRO_NV-$PRIV_NAME-$TEST_ENVIRON" + # Requires stdin and stderr combined! + cat - \ + |& awk --file "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk" \ + |& "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/logformatter" "$output_name" + else + # Assume script is run by a human, they want output immediatly + cat - + fi } # Handle local|remote integration|system testing in a uniform way diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 36878365d..86b8d78ef 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -50,14 +50,9 @@ echo -e "\n# Begin single-use VM global variables (${BASH_SOURCE[0]})" \ done <<<"$(passthrough_envars)" ) >> "/etc/ci_environment" -##### -##### FIXME. /etc/containers/storage.conf should have a driver name set -##### Remove when VMs updated -sed 's/^driver.*=.*""/driver = "overlay"/g' -i /etc/containers/storage.conf - # This is a possible manual maintenance gaff, check to be sure everything matches. # shellcheck disable=SC2154 -[[ "$DISTRO_NV" == "$OS_REL_VER" ]] || \ +[[ "$DISTRO_NV" =~ $OS_REL_VER ]] || \ die "Automation spec. '$DISTRO_NV'; actual host '$OS_REL_VER'" # Only allow this script to execute once @@ -200,7 +195,9 @@ case "$TEST_FLAVOR" in build) make clean ;; unit) ;; apiv2) ;& # use next item - compose) ;& + compose) + dnf install -y $PACKAGE_DOWNLOAD_DIR/podman-docker* + ;& # continue with next item int) ;& sys) ;& upgrade_test) ;& |