Run tmt tests from default git sources.

It wrongly downloaded sources from fixed c9s branch
while we need to run it from default location. Either
from a branch or from merge request.
This commit is contained in:
Ondrej Kozina 2025-07-08 17:38:31 +02:00
parent 2f9c252e29
commit f58e6a491d
2 changed files with 14 additions and 37 deletions

View File

@ -18,54 +18,23 @@ prepare:
- expect - expect
- keyutils - keyutils
- jq - jq
- sharutils
- glibc
- vim-common - vim-common
- sharutils - sharutils
- cryptsetup-libs
- glibc
- libblkid
- popt
- libpwquality
- libuuid
- popt-devel
- libpwquality-devel
- rubygem-asciidoctor
discover: discover:
how: shell how: shell
url: https://gitlab.com/redhat/centos-stream/rpms/cryptsetup.git
ref: c9s
dist-git-source: true dist-git-source: true
dist-git-install-builddeps: true
tests: tests:
- name: regression tests - name: upstream tier0
test: | duration: 2h
set -x test: exec plans/run-local-tests.sh
if [ -z "$PKG_VER" ]; then
PKG_VER=`rpmspec -q --srpm --qf "%{version}" cryptsetup.spec`
fi
if [ -z "$PKG_VER" ]; then
echo "Error: Unable to extract package version"
exit 1
fi
pushd $TMT_SOURCE_DIR/cryptsetup-${PKG_VER}/tests
if [[ -z $CRYPTSETUP_PATH ]];then
export CRYPTSETUP_PATH="/sbin"
fi
make -f Makefile.localtest tests
if [[ $? != 0 ]];then
echo "Something was wrong here in localtests"
exit 2
fi
popd
execute: execute:
- how: tmt - how: tmt
provision: provision:
hardware: hardware:
memory: ">= 3 GB" memory: ">= 3 GB"
adjust:
enabled: false
when: distro == fedora
because: They don't have access to internal repos.

8
plans/run-local-tests.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
set -eux
set -o pipefail
pushd $TMT_SOURCE_DIR/cryptsetup-*/tests
make -f Makefile.localtest tests
popd