build-support/testers: don't fail the test on empty list of pkg-config modules

Without the change tests like `xorg.imake.tests.pkg-config` fail as:

    $ nix build --no-link -f. -L xorg.imake.tests.pkg-config
    error: builder for '/nix/store/i3zb1ykjzm0622497cn4dvifk36sx00r-check-pkg-config-.drv' failed to produce output path for output 'out' at '/nix/store/i3zb1ykjzm0622497cn4dvifk36sx00r-check-pkg-config-.drv.chroot/nix/store/63y92rvkp7gzzp0hlcjyj92srzjwndrq-check-pkg-config-'
    error: 1 dependencies of derivation '/nix/store/8qycf49a4h9jj2662d9cf4d56aq6djjj-check-meta-pkg-config-modules-for-imake-1.0.9.drv' failed to build

Let's always produce empty output for zero-modules tests.
This commit is contained in:
Sergei Trofimovich 2024-01-29 10:25:34 +00:00
parent 3b02018161
commit c1d3b6b7ba

View File

@ -30,6 +30,7 @@ runCommand testName {
}
package.meta;
} ''
touch "$out"
for moduleName in $moduleNames; do
echo "checking pkg-config module $moduleName in $buildInputs"
set +e