diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2018-03-22 19:38:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 19:38:17 -0500 |
commit | 1f2369387734044889fc51e6e12327ed3d461ca9 (patch) | |
tree | 72ff7ba8ee2ffdf7d49c55dc2bef731656c5254b | |
parent | f721fb3e4c9dc6354e6db25a544e02e726107b5e (diff) | |
download | spack-1f2369387734044889fc51e6e12327ed3d461ca9.tar.gz spack-1f2369387734044889fc51e6e12327ed3d461ca9.tar.bz2 spack-1f2369387734044889fc51e6e12327ed3d461ca9.tar.xz spack-1f2369387734044889fc51e6e12327ed3d461ca9.zip |
Fix giflib unit tests on macOS/BSD (#7519)
* Fix giflib unit tests on macOS/BSD
* Unit tests occasionally fail when run in parallel
-rw-r--r-- | var/spack/repos/builtin/packages/giflib/bsd-head.patch | 19 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/giflib/package.py | 5 |
2 files changed, 24 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/giflib/bsd-head.patch b/var/spack/repos/builtin/packages/giflib/bsd-head.patch new file mode 100644 index 0000000000..3831f2ca57 --- /dev/null +++ b/var/spack/repos/builtin/packages/giflib/bsd-head.patch @@ -0,0 +1,19 @@ +The BSD version of head does not accept the --bytes option, +nor does it accept negative integers. Use dd instead for +BSD support. + +--- a/tests/makefile 2014-05-16 05:46:53.000000000 -0500 ++++ b/tests/makefile 2018-03-18 18:29:47.000000000 -0500 +@@ -103,10 +103,10 @@ + + giffix-rebuild: + @echo "Rebuilding giffix test." +- @head --bytes=-20 <$(PICS)/treescap.gif | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d >giffixed.ico ++ @dd if=$(PICS)/treescap.gif bs=1 count=387 | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d >giffixed.ico + giffix-regress: + @echo "giffix: Testing giffix behavior" +- @head --bytes=-20 <$(PICS)/treescap.gif | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d | diff -u giffixed.ico - ++ @dd if=$(PICS)/treescap.gif bs=1 count=387 | $(UTILS)/giffix 2>/dev/null | $(UTILS)/gifbuild -d | diff -u giffixed.ico - + + gifinto-regress: + @echo "gifinto: Checking behavior on short files." diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py index 3ab0d8453f..a320b3ceb5 100644 --- a/var/spack/repos/builtin/packages/giflib/package.py +++ b/var/spack/repos/builtin/packages/giflib/package.py @@ -33,3 +33,8 @@ class Giflib(AutotoolsPackage): url = "https://downloads.sourceforge.net/project/giflib/giflib-5.1.4.tar.bz2" version('5.1.4', '2c171ced93c0e83bb09e6ccad8e3ba2b') + + patch('bsd-head.patch') + + def check(self): + make('check', parallel=False) |