1ab5fc7490
The deprecated STI gating test definition is removed in favor of flexible metadata format (fmf). This fixes testing in Testing Farm which is enabled in CentOS Stream merge requests. This is not the final version, some workarounds were needed. Most notable ones are patching sources which is not yet supported by tmt (test management tool - used to run tests in Testing Farm). Tmt also does not download rubygems, so a macro was put in place to avoid errors while trying to copy them in the prep phase of rpmbuild. To ensure smooth build process in the future, we will test that the new gating test definition will match the previous result without changing the package content. Resolves: RHEL-15217
20 lines
827 B
Bash
Executable File
20 lines
827 B
Bash
Executable File
set -eo xtrace
|
|
# Rpmbuild expects patches in the _sourcedir
|
|
mv *.patch $TMT_SOURCE_DIR
|
|
mkdir builddir
|
|
# Workaround for tmt not downloading rubygems, there is a spec macro that skips
|
|
# copying them during prep phase
|
|
rpmbuild -bp pcs.spec --nodeps --define "_sourcedir $TMT_SOURCE_DIR" \
|
|
--define "_builddir $(pwd)/builddir" --define="skip_bundle_prep 1"
|
|
# Remove pcs-web-ui in builddir for "cd pcs-*" to have exactly one match
|
|
rm -rf builddir/pcs-web-ui-*
|
|
cd builddir/pcs-*
|
|
# Run autotools, use bundled dependencies from the system
|
|
export PYTHONPATH=/usr/lib64/pcs/pcs_bundled/packages/
|
|
export GEM_HOME=/usr/lib64/pcsd/vendor/bundle/
|
|
./autogen.sh
|
|
# Workaround until configure.ac is prepared for centos-stream-*
|
|
./configure --with-distro=rhel
|
|
# Remove pcs sources to make sure tests are not using any of those files
|
|
rm -rf pcs
|