mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-23 13:48:21 +03:00
Merge pull request #311069 from nbraud/fix-307770
testers.hasPkgConfigModules: fix bug in `versionCheck` handling
This commit is contained in:
commit
28df2298ff
@ -45,7 +45,7 @@ runCommand testName {
|
||||
if [[ "$moduleVersion" == "$version" ]]; then
|
||||
echo "✅ pkg-config module $moduleName exists and has version $moduleVersion"
|
||||
else
|
||||
echo "❌ pkg-config module $moduleName exists and has version $moduleVersion when $version was expected"
|
||||
echo "${if versionCheck then "❌" else "ℹ️"} pkg-config module $moduleName exists at version $moduleVersion != $version (drv version)"
|
||||
((versionMismatch+=1))
|
||||
fi
|
||||
printf '%s\t%s\n' "$moduleName" "$version" >> "$out"
|
||||
@ -55,7 +55,7 @@ runCommand testName {
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $notFound -eq 0 ]] && ([[ $versionMismatch -eq 0 ]] || [[ "$versionCheck" == false ]]); then
|
||||
if [[ $notFound -eq 0 ]] && ([[ $versionMismatch -eq 0 ]] || [[ -z "$versionCheck" ]]); then
|
||||
exit 0
|
||||
fi
|
||||
if [[ $notFound -ne 0 ]]; then
|
||||
|
@ -11,10 +11,15 @@ lib.recurseIntoAttrs {
|
||||
|
||||
miniz-versions-mismatch = testers.testBuildFailure (testers.hasPkgConfigModules {
|
||||
package = miniz;
|
||||
version = "1.2.3";
|
||||
version = "1.2.3"; # Deliberately-incorrect version number
|
||||
versionCheck = true;
|
||||
});
|
||||
|
||||
miniz-no-versionCheck = testers.hasPkgConfigModules {
|
||||
package = miniz;
|
||||
version = "1.2.3"; # Deliberately-incorrect version number
|
||||
};
|
||||
|
||||
zlib-has-zlib = testers.hasPkgConfigModules {
|
||||
package = zlib;
|
||||
moduleNames = [ "zlib" ];
|
||||
|
Loading…
Reference in New Issue
Block a user