Skip to content

Commit

Permalink
speculate.cabal: remove plus-abs benchmark
Browse files Browse the repository at this point in the history
it is included in extra-source-files anyway.

This makes it so that we don't need the test/sdist Hack now.

A bug has nevertheless been reported to the cabal team:

haskell/cabal#6611
  • Loading branch information
rudymatela committed Mar 23, 2020
1 parent e9472f5 commit e4664e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
7 changes: 0 additions & 7 deletions speculate.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ test-suite utils
default-language: Haskell2010
type: exitcode-stdio-1.0

benchmark plus-abs
main-is: plus-abs.hs
hs-source-dirs: eg
build-depends: base >= 4 && < 5, speculate
default-language: Haskell2010
type: exitcode-stdio-1.0

benchmark test-stats
main-is: stats.hs
other-modules: Test, Test.ListableExpr
Expand Down
9 changes: 3 additions & 6 deletions test/sdist
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@ pkg=`find dist* -name $pkgbase.tar.gz`
tmp=`mktemp -d /tmp/test-sdist-XXXXXXXXXX`

# Test if our file is compatible with case-insensitive filesystems.
tar -tf $pkg | sort -u | sort --ignore-case > $tmp/ls-cabal-i
tar -tf $pkg | sort -u | sort --ignore-case --unique > $tmp/ls-cabal-iu
tar -tf $pkg | sort --ignore-case > $tmp/ls-cabal-i
tar -tf $pkg | sort --ignore-case --unique > $tmp/ls-cabal-iu
diff -rud $tmp/ls-cabal-i $tmp/ls-cabal-iu

if [ -d .git ]
then
# Test if files included by cabal are the same as files tracked in git.
git ls-files | sort > $tmp/ls-git
tar -tf $pkg | sort -u | grep -v "/$" | sed -e "s,$pkgbase/,," | sort > $tmp/ls-cabal
tar -tf $pkg | grep -v "/$" | sed -e "s,$pkgbase/,," | sort > $tmp/ls-cabal
diff -rud $tmp/ls-git $tmp/ls-cabal
fi

rm -r $tmp

# NOTE: above the "sort -u" is only needed because of a bug in cabal:
# the "plus-abs.hs" file is included twice for some reason...

0 comments on commit e4664e4

Please sign in to comment.