]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Clean up profiling_gcc_10+ test suite
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 19 Apr 2025 18:35:04 +0000 (20:35 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 19 Apr 2025 20:02:01 +0000 (22:02 +0200)
test/suites/profiling_gcc_10+.bash

index d983c9e3839f5560c98e40add734a04f0fc93392..c414931efc0a1a885de48953381603606e902011 100644 (file)
@@ -8,7 +8,6 @@ gcda_cycle() {
 
 SUITE_profiling_gcc_10+_PROBE() {
     echo 'int main(void) { return 0; }' >test.c
-    $COMPILER --coverage -fprofile-prefix-path=. -c test.c
     if ! $COMPILER_TYPE_GCC; then
         echo "compiler is not GCC"
     fi
@@ -19,7 +18,7 @@ SUITE_profiling_gcc_10+_PROBE() {
         echo "compiler does not support -fprofile-prefix-path=path"
     fi
     if ! $COMPILER --coverage -fprofile-dir=. -c test.c 2>/dev/null; then
-        echo "compiler does not support -fprofile-prefix-path=path"
+        echo "compiler does not support -fprofile-dir=path"
     fi
 }
 
@@ -30,8 +29,9 @@ SUITE_profiling_gcc_10+_SETUP() {
 
 SUITE_profiling_gcc_10+() {
     # -------------------------------------------------------------------------
-    TEST "-fprofile-prefirx-path=path, gcc coverage build"
-    # When using a relative path for -fprofile-dir in gcc 9+, absolute object file path will be mangled in the .gcda filename
+    TEST "-fprofile-prefix-path=path, gcc coverage build"
+    # When using a relative path for -fprofile-dir in GCC 9+, absolute object
+    # file path will be mangled in the .gcda filename.
     CCACHE_SLOPPINESS_OLD="$CCACHE_SLOPPINESS"
     export CCACHE_SLOPPINESS="$CCACHE_SLOPPINESS gcno_cwd"
 
@@ -53,9 +53,10 @@ SUITE_profiling_gcc_10+() {
     export CCACHE_SLOPPINESS="$CCACHE_SLOPPINESS_OLD"
 
     # -------------------------------------------------------------------------
-    TEST "-fprofile-prefirx-path=pwd, -fprofile-dir=., gcc coverage build"
-    # GCC 10 and newer allows to lstrip the mangled absolute path in the generated gcda file name
-    # This doesn't effect the absolute cwd path in the gcno file (but there's sloppiness for that)
+    TEST "-fprofile-prefix-path=pwd, -fprofile-dir=., gcc coverage build"
+    # GCC 10 and newer allows to lstrip the mangled absolute path in the
+    # generated gcda file name. This doesn't effect the absolute cwd path in the
+    # gcno file (but there's sloppiness for that).
     CCACHE_SLOPPINESS_OLD="$CCACHE_SLOPPINESS"
     export CCACHE_SLOPPINESS="$CCACHE_SLOPPINESS gcno_cwd"
 
@@ -79,8 +80,9 @@ SUITE_profiling_gcc_10+() {
     export CCACHE_SLOPPINESS="$CCACHE_SLOPPINESS_OLD"
 
     # -------------------------------------------------------------------------
-    TEST "-fprofile-prefirx-path=dummy, -fprofile-dir=., gcc coverage build"
-    # lstripping the mangled .gcda filename only works with a correct -fprofile-prefirx-path
+    TEST "-fprofile-prefix-path=dummy, -fprofile-dir=., gcc coverage build"
+    # lstripping the mangled .gcda filename only works with a correct
+    # -fprofile-prefix-path
     CCACHE_SLOPPINESS_OLD="$CCACHE_SLOPPINESS"
     export CCACHE_SLOPPINESS="$CCACHE_SLOPPINESS gcno_cwd"
 
@@ -101,4 +103,3 @@ SUITE_profiling_gcc_10+() {
 
     export CCACHE_SLOPPINESS="$CCACHE_SLOPPINESS_OLD"
 }
-