about summary refs log tree commit diff
path: root/pkgs/build-support/testers
diff options
context:
space:
mode:
authornicoo <nicoo@mur.at>2024-04-29 16:26:23 +0000
committernicoo <nicoo@mur.at>2024-04-30 20:34:07 +0000
commit5fce6cb3342b834018d774355ac64464a0a821c8 (patch)
treeaefeb21afb5681ad00b3f90558e670271d088b17 /pkgs/build-support/testers
parentcd2239d444d3e2779257d95224eba4951319cdb0 (diff)
testers.hasPkgConfigModules: Report all errors rather than fail early
Diffstat (limited to 'pkgs/build-support/testers')
-rw-r--r--pkgs/build-support/testers/hasPkgConfigModules/tester.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/build-support/testers/hasPkgConfigModules/tester.nix b/pkgs/build-support/testers/hasPkgConfigModules/tester.nix
index bbcc4f0c0f710..e2fc8c5bc2e0f 100644
--- a/pkgs/build-support/testers/hasPkgConfigModules/tester.nix
+++ b/pkgs/build-support/testers/hasPkgConfigModules/tester.nix
@@ -31,6 +31,7 @@ runCommand testName {
         package.meta;
   } ''
     touch "$out"
+    notFound=0
     for moduleName in $moduleNames; do
       echo "checking pkg-config module $moduleName in $buildInputs"
       set +e
@@ -41,10 +42,15 @@ runCommand testName {
         echo "✅ pkg-config module $moduleName exists and has version $version"
         printf '%s\t%s\n' "$moduleName" "$version" >> "$out"
       else
-        echo "These modules were available in the input propagation closure:"
-        $PKG_CONFIG --list-all
         echo "❌ pkg-config module $moduleName was not found"
-        false
+        ((notFound+=1))
       fi
     done
+
+    if [[ $notFound -ne 0 ]]; then
+      echo "$notFound modules not found"
+      echo "These modules were available in the input propagation closure:"
+      $PKG_CONFIG --list-all
+      exit 1
+    fi
   ''