diff --git a/rhbz_2239619/main.fmf b/rhbz_2239619/main.fmf new file mode 100644 index 0000000..e0c5e69 --- /dev/null +++ b/rhbz_2239619/main.fmf @@ -0,0 +1,25 @@ +summary: Test if debug information is disabled by default +test: "$WITH_SCL ./runtest.sh" +require: [] +framework: shell +tier: 1 +component: + - llvm-toolset + - clang + +adjust: + # Common requirements when LLVM is not SCL-ized + - require+: + - clang + when: "collection is not defined" + + # 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" + - require+: + - llvm-toolset-15.0-clang + when: "collection == llvm-toolset-15.0" diff --git a/rhbz_2239619/runtest.sh b/rhbz_2239619/runtest.sh new file mode 100755 index 0000000..4f4559b --- /dev/null +++ b/rhbz_2239619/runtest.sh @@ -0,0 +1,9 @@ +#!/bin/sh -eux + +# Ensure that compiled code does not have debug information enabled by +# default. + +if clang -S test.c -o - | grep "\.section[[:space:]]\+\.debug_info"; then + echo "Error: debug information is enabled by default!" >&2 + exit 1 +fi diff --git a/rhbz_2239619/test.c b/rhbz_2239619/test.c new file mode 100644 index 0000000..ade4548 --- /dev/null +++ b/rhbz_2239619/test.c @@ -0,0 +1,3 @@ +int main(){ + return 0; +}