From d2ccdae34dff0b40566d0d590d5662f44d106989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Tue, 8 Apr 2025 11:55:08 +0200 Subject: [PATCH] Do not call `arch` over and over again --- tests/Sanity/suite_gfortran/runtest.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/Sanity/suite_gfortran/runtest.sh b/tests/Sanity/suite_gfortran/runtest.sh index 1cac57c..4375b9a 100755 --- a/tests/Sanity/suite_gfortran/runtest.sh +++ b/tests/Sanity/suite_gfortran/runtest.sh @@ -4,6 +4,7 @@ . /usr/share/beakerlib/beakerlib.sh || exit 1 . "${0%/*}"/../../lib/common.sh || exit 1 +PRI_ARCH=$(arch) GCC="${GCC:-$(type -P gcc)}" GCC_RPM_NAME=$(rpm --qf '%{name}' -qf "$GCC") @@ -82,7 +83,7 @@ rlJournalStart if [[ "$GCC" != *toolset-* ]] && rlIsRHEL 8 && rlIsRHEL '<8.4'; then rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/typebound_call_22.f03" fi - if [[ "$(arch)" = s390x ]]; then + if [[ "$PRI_ARCH" = s390x ]]; then if [[ "$GCC" == */*toolset-12/* ]] && rlIsRHEL 7; then rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90" rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f" @@ -98,7 +99,7 @@ rlJournalStart rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/reassoc_4.f" fi fi - if [[ "$(arch)" = ppc64le ]]; then + if [[ "$PRI_ARCH" = ppc64le ]]; then if rlIsRHEL '<10'; then rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/large_real_kind_form_io_2.f90" rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/ieee/large_2.f90" @@ -116,7 +117,7 @@ rlJournalStart rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/round_4.f90" fi fi - if [[ "$(arch)" = ppc64 ]] && rlIsRHEL 7; then + if [[ "$PRI_ARCH" = ppc64 ]] && rlIsRHEL 7; then if [[ "$GCC" == *toolset-* ]]; then rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/ieee/large_2.f90" else @@ -125,15 +126,15 @@ rlJournalStart fi fi # https://issues.redhat.com/browse/RHEL-64922 - if [[ "$(arch)" = x86_64 ]] && rlIsRHEL 10; then + if [[ "$PRI_ARCH" = x86_64 ]] && rlIsRHEL 10; then rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/vect/pr83232.f90" fi # https://issues.redhat.com/browse/RHEL-64924 - if [[ $(arch) = ppc64le ]] && rlTestVersion "$GCC_DUMPVERSION" '=' 14; then + if [[ $PRI_ARCH = ppc64le ]] && rlTestVersion "$GCC_DUMPVERSION" '=' 14; then rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/ieee/comparisons_3.F90" fi # https://issues.redhat.com/browse/RHEL-66174 - if [[ "$(arch)" = ppc64le ]] && rlIsRHEL 10; then + if [[ "$PRI_ARCH" = ppc64le ]] && rlIsRHEL 10; then rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/default_format_{,denormal_}2.f90" rlRun "rm -f $SRCROOT/gcc/testsuite/gfortran.dg/large_real_kind_form_io_2.f90" fi