From e8bd45d760b938b3c1eecd456bb3ee2a2966a52c Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Wed, 19 Mar 2025 18:25:07 +0100 Subject: [PATCH] tests: Remove the need to pass $FISH_SOURCE_DIR This is only used in check-translations, where we can just use a relative path from the test script --- cmake/Tests.cmake | 1 - tests/checks/check-translations.fish | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/Tests.cmake b/cmake/Tests.cmake index 075108209..8bc525039 100644 --- a/cmake/Tests.cmake +++ b/cmake/Tests.cmake @@ -40,7 +40,6 @@ set(SKIP_RETURN_CODE 125) # The top-level test target is "fish_run_tests". add_custom_target(fish_run_tests COMMAND env CTEST_PARALLEL_LEVEL=${CTEST_PARALLEL_LEVEL} FISH_FORCE_COLOR=1 - FISH_SOURCE_DIR=${CMAKE_SOURCE_DIR} ${CMAKE_CTEST_COMMAND} --force-new-ctest-process # --verbose --output-on-failure --progress DEPENDS fish fish_indent fish_key_reader fish_test_helper diff --git a/tests/checks/check-translations.fish b/tests/checks/check-translations.fish index 2ee71799a..28d85ddbe 100644 --- a/tests/checks/check-translations.fish +++ b/tests/checks/check-translations.fish @@ -1,8 +1,10 @@ #RUN: fish=%fish %fish %s #REQUIRES: msgfmt --help +set -l dir (status dirname) + set -l fail_count 0 -for file in $FISH_SOURCE_DIR/po/*.po +for file in $dir/../../po/*.po # We only check the format strings. # Later on we might do a full "--check" to also check the headers. msgfmt --check-format $file