2022-11-29 15:41:27 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
export RPM_PACKAGE_NAME={{ name }}
|
|
|
|
export RPM_PACKAGE_VERSION={{ version }}
|
|
|
|
export RPM_PACKAGE_RELEASE={{ release }}
|
|
|
|
export RPM_ARCH={{ arch }}
|
2023-06-12 14:21:32 +00:00
|
|
|
export RPM_BUILD_NCPUS="$(getconf _NPROCESSORS_ONLN)"
|
2022-11-29 15:41:27 +00:00
|
|
|
|
|
|
|
testdir="$(mktemp -d)"
|
|
|
|
trap "rm -rf ${testdir}" EXIT
|
|
|
|
|
2023-06-12 14:21:32 +00:00
|
|
|
build_flags="$(eval "echo $(rpm --eval '%{_smp_mflags}')")"
|
|
|
|
|
2022-11-29 15:41:27 +00:00
|
|
|
cp -rp /usr/share/{{ name }}-tests "${testdir}/"
|
2023-06-12 14:21:32 +00:00
|
|
|
make -C "${testdir}/{{ name }}-tests" $build_flags
|
2022-11-29 15:41:27 +00:00
|
|
|
keyctl session - make -C "${testdir}/{{ name }}-tests" check
|