mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 07:04:28 +00:00
e5f563ef03
Since v1.4.9, another stat command has been added to playTests.sh. Similar to other uses in this file, it attempts to use BSD syntax on Darwin/BSD, and must be patched to unconditionally use GNU syntax.
34 lines
903 B
Diff
34 lines
903 B
Diff
--- a/tests/playTests.sh
|
|
+++ b/tests/playTests.sh
|
|
@@ -112,22 +112,12 @@ case "$OS" in
|
|
esac
|
|
|
|
case "$UNAME" in
|
|
- Darwin) MD5SUM="md5 -r" ;;
|
|
- FreeBSD) MD5SUM="gmd5sum" ;;
|
|
- NetBSD) MD5SUM="md5 -n" ;;
|
|
- OpenBSD) MD5SUM="md5" ;;
|
|
*) MD5SUM="md5sum" ;;
|
|
esac
|
|
|
|
MTIME="stat -c %Y"
|
|
-case "$UNAME" in
|
|
- Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;;
|
|
-esac
|
|
|
|
GET_PERMS="stat -c %a"
|
|
-case "$UNAME" in
|
|
- Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;;
|
|
-esac
|
|
|
|
assertFilePermissions() {
|
|
STAT1=$($GET_PERMS "$1")
|
|
@@ -967,7 +957,6 @@ $MD5SUM dirTestDict/* > tmph1
|
|
zstd -f --rm dirTestDict/* -D tmpDictC
|
|
zstd -d --rm dirTestDict/*.zst -D tmpDictC # note : use internal checksum by default
|
|
case "$UNAME" in
|
|
- Darwin) println "md5sum -c not supported on OS-X : test skipped" ;; # not compatible with OS-X's md5
|
|
*) $MD5SUM -c tmph1 ;;
|
|
esac
|
|
rm -rf dirTestDict
|