From 507549fbee6ca8edd57fe0604dc923c7c544a269 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 15 Dec 2025 18:19:27 +0100 Subject: [PATCH] test: Fix -march=native test to work on hybrid CPU systems On a hybrid CPU system (e.g. Intel with performance and efficient cores), -march=native expansion can be different on different core types and thus fail the "-march=native, no CWD in input hash" test if the first and second compilation end up on different core types. Fix this by just verifying that CWD doesn't appear in the expansion. --- test/suites/base.bash | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/test/suites/base.bash b/test/suites/base.bash index e6ed77e9..76650831 100644 --- a/test/suites/base.bash +++ b/test/suites/base.bash @@ -1705,18 +1705,8 @@ EOF # ------------------------------------------------------------------------- if $COMPILER -march=native -c test1.c 2>/dev/null; then TEST "-march=native, no CWD in input hash" - mkdir a b - cp test1.c a - cp test1.c b - cd a - $CCACHE_COMPILE -march=native -c test1.c - expect_stat preprocessed_cache_hit 0 - expect_stat cache_miss 1 - cd ../b - $CCACHE_COMPILE -march=native -c test1.c - cd .. - expect_stat preprocessed_cache_hit 1 - expect_stat cache_miss 1 + CCACHE_DEBUG=1 $CCACHE_COMPILE -march=native -c test1.c + expect_not_contains test1.o.*.ccache-input-text "$PWD" fi # ------------------------------------------------------------------------- -- 2.47.3