Setup systemd source tree

This commit is contained in:
Frantisek Sumsal 2023-11-20 15:17:51 +01:00
commit e078eb5b5d

View file

@ -3,6 +3,22 @@
set -eux
set -o pipefail
# Prepare systemd source tree
#
# Note: the snippet below assumes that the target PR branch is always 'main'
#
# Relevant docs:
# - https://packit.dev/docs/configuration/upstream/tests#optional-parameters
git clone "${PACKIT_TARGET_URL:-https://github.com/systemd/systemd}" systemd
cd systemd
# If we're running in a pull request job, merge the remote branch into the current main
if [[ -n "${PACKIT_SOURCE_URL:-}" ]]; then
git remote add pr "${PACKIT_SOURCE_URL:?}"
git fetch pr "${PACKIT_SOURCE_BRANCH:?}"
git merge "pr/$PACKIT_SOURCE_BRANCH"
fi
git log -1
export ARTIFACT_DIRECTORY="${TMT_TEST_DATA:?}"
export TEST_SAVE_JOURNAL=fail
export TEST_SHOW_JOURNAL=warning