diff --git a/tests/ppc64le-long-double/main.fmf b/tests/ppc64le-long-double/main.fmf index cd73b29..c341e3c 100644 --- a/tests/ppc64le-long-double/main.fmf +++ b/tests/ppc64le-long-double/main.fmf @@ -1,7 +1,31 @@ summary: Test that gcc and clang use the same long double format on ppc64le -require: - - clang - - qemu-user-static - - mock -test: ./runtest.sh +test: $WITH_SCL ./runtest.sh duration: 1h +adjust: + # Common requirements when LLVM is not SCL-ized + - require+: + - clang + when: "collection is not defined" + + - because: "Fedora CI runs in x86_64 only, emulate with qemu and mock" + require+: + - qemu-user-static + - mock + test: ./runtest-fedora.sh + when: distro == fedora and arch == x86_64 + continue: false + + - enabled: false + when: arch != ppc64le + + - require+: + - gcc + when: distro != fedora + + # Requirements for SCL-ized LLVM + - require+: + - llvm-toolset-13.0-clang + when: "collection == llvm-toolset-13.0" + - require+: + - llvm-toolset-14.0-clang + when: "collection == llvm-toolset-14.0" diff --git a/tests/ppc64le-long-double/runtest-fedora.sh b/tests/ppc64le-long-double/runtest-fedora.sh new file mode 100755 index 0000000..25dbb9c --- /dev/null +++ b/tests/ppc64le-long-double/runtest-fedora.sh @@ -0,0 +1,14 @@ +set -e + +fedora_release=`rpm -E %{fedora}` +mock_root=fedora-$fedora_release-ppc64le +triple=ppc64le-redhat-linux + +mock -r $mock_root --isolation=simple --install gcc +gcc_output=$(mock -r $mock_root --isolation=simple -q --shell gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) +clang_output=$(clang -target $triple -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) + +echo "gcc: $gcc_output" +echo "clang: $clang_output" + +test "$gcc_output" = "$clang_output" diff --git a/tests/ppc64le-long-double/runtest.sh b/tests/ppc64le-long-double/runtest.sh index 25dbb9c..8061bd7 100755 --- a/tests/ppc64le-long-double/runtest.sh +++ b/tests/ppc64le-long-double/runtest.sh @@ -1,12 +1,7 @@ set -e -fedora_release=`rpm -E %{fedora}` -mock_root=fedora-$fedora_release-ppc64le -triple=ppc64le-redhat-linux - -mock -r $mock_root --isolation=simple --install gcc -gcc_output=$(mock -r $mock_root --isolation=simple -q --shell gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) -clang_output=$(clang -target $triple -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) +gcc_output=$(gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) +clang_output=$(clang -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) echo "gcc: $gcc_output" echo "clang: $clang_output"