Portability: wc -l sometimes has leading spaces, trim them off.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 5 Dec 2014 23:50:53 +0000 (15:50 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sat, 6 Dec 2014 03:36:47 +0000 (19:36 -0800)
Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

Test Plan: validate

Reviewers: austin

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D557

testsuite/tests/cabal/cabal06/Makefile

index 5934b9b..8b918a0 100644 (file)
@@ -46,9 +46,9 @@ cabal06: clean
        cd q && $(SETUP) copy
        (cd q && $(SETUP) register --print-ipid) > tmp_second_q
        @echo "Does the first instance of q depend on p-1.0?"
-       '$(GHC_PKG)' field --ipid `cat tmp_first_q` depends -f tmp.d | grep p-1.0 | wc -l
+       '$(GHC_PKG)' field --ipid `cat tmp_first_q` depends -f tmp.d | grep p-1.0 | wc -l | sed 's/[[:space:]]//g'
        @echo "Does the second instance of q depend on p-1.0?"
-       '$(GHC_PKG)' field --ipid `cat tmp_second_q` depends -f tmp.d | grep p-1.1 | wc -l
+       '$(GHC_PKG)' field --ipid `cat tmp_second_q` depends -f tmp.d | grep p-1.1 | wc -l | sed 's/[[:space:]]//g'
        cd r && $(SETUP) clean
        cd r && ../Setup configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --dependency="q=`cat ../tmp_first_q`" --constraint="p==1.0" --prefix='$(PWD)/inst-e' --ghc-pkg-options='--enable-multi-instance'
        cd r && $(SETUP) build