From 53e1e785a077028b67e512f50f965493308a7216 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 17 Aug 2023 17:46:55 -0700 Subject: [PATCH] Update the Sanity/testsuite test for new build location 6bfd06790befd11d1c11be000a159aa51c4b2e1b changed where the build actually happens, so these cp commands fail and break the test. This change is based on the version in https://gitlab.com/redhat/centos-stream/rpms/binutils/-/blob/c9s/tests/Sanity/testsuite/runtest.sh but reimplemented in line with the rest of this somewhat different version of the test (I am not sure what the story is with these different versions of the tests in Fedora vs. CentOS Stream, I'm trying to find that out). Signed-off-by: Adam Williamson --- tests/Sanity/testsuite/runtest.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh index 7682fd2..5db414d 100755 --- a/tests/Sanity/testsuite/runtest.sh +++ b/tests/Sanity/testsuite/runtest.sh @@ -89,13 +89,14 @@ rlJournalStart export BUILDDIR=`rpm --eval=%_builddir` export CURRENT_BUILD=${BUILDDIR}/binutils-`rpmquery $PACKAGE --queryformat=%{VERSION}` rlRun "rpmbuild -bc $SPECDIR/binutils.spec" + rlRun "ARCH=$(arch)" - rlRun "cp $CURRENT_BUILD/binutils/binutils.log $CURRENT_BUILD/binutils/binutils.sum $LOGDIR/" - rlRun "cp $CURRENT_BUILD/ld/ld.log $CURRENT_BUILD/ld/ld.sum $LOGDIR/" - rlRun "cp $CURRENT_BUILD/gas/testsuite/gas.log $CURRENT_BUILD/gas/testsuite/gas.sum $LOGDIR/" + rlRun "cp $CURRENT_BUILD/build-$ARCH-redhat-linux/binutils/binutils.log $CURRENT_BUILD/build-$ARCH-redhat-linux/binutils/binutils.sum $LOGDIR/" + rlRun "cp $CURRENT_BUILD/build-$ARCH-redhat-linux/ld/ld.log $CURRENT_BUILD/build-$ARCH-redhat-linux/ld/ld.sum $LOGDIR/" + rlRun "cp $CURRENT_BUILD/build-$ARCH-redhat-linux/gas/testsuite/gas.log $CURRENT_BUILD/build-$ARCH-redhat-linux/gas/testsuite/gas.sum $LOGDIR/" rlPhaseEnd - if [ "$(arch)" = "x86_64" ]; then + if [ "$ARCH" = "x86_64" ]; then rlPhaseStartTest Regression-bz1614908 rlLogInfo "Checking if bz#1614908 is reproducible" rlRun "gold_test_binary=$(find $CURRENT_BUILD -iname gnu_property_test -type f -executable)" 0 "Looking for binary from gold testsuite" @@ -120,7 +121,7 @@ rlJournalStart if [ "$?" = "0" ]; then expected_fails_file="" # here we define expected failures if needed if [ "$expected_fails_file" = "" ]; then - rlFail "No list of expected failures exists for this environment: release=$(cat /etc/redhat-release), arch=$(arch), tool=$TOOL" + rlFail "No list of expected failures exists for this environment: release=$(cat /etc/redhat-release), arch=$ARCH, tool=$TOOL" rlFail "Unexpected failures found" else rlRun "diff $expected_fails_file $LOGDIR/$TOOL.failed" 0,1