fusionio: Correct binary testing code
commit00230c92402bb3d94eae0db63cd6d2ba237b541f
authorWilliam A. Kennington III <william@wkennington.com>
dateMon 27 Apr 2015, 17:38 (12 years ago)
parent9258e8a
pkgs/os-specific/linux/fusionio/util.nix+10−1
@@ -19,7 +19,16 @@ stdenv.mkDerivation {
1919 for BIN in $(find $out/bin -type f); do
2020 echo Patching $BIN
2121 patchelf --set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" --set-rpath "${glibc}/lib:${gcc.cc}/lib:${libuuid}/lib:$out/lib" $BIN
22− $BIN --help >/dev/null 2>&1 || [ "$?" -lt "128" ] || { echo "Failed testing $BIN"; exit 1; }
22+
23+ # Test our binary to see if it was correctly patched
24+ set +e
25+ $BIN --help >/dev/null 2>&1
26+ ST="$?"
27+ set -e
28+ if [ "$ST" -ge "10" ]; then
29+ echo "Failed testing $BIN"
30+ exit 1;
31+ fi
2332 done
2433 '';
2534