Avoid using runghc to run test suite as it is not available on all architectures. Closes: #603006

This commit is contained in:
Joey Hess 2010-11-10 10:49:35 -04:00
parent 536bc97d25
commit 515d6b6c7d
5 changed files with 16 additions and 9 deletions

View file

@ -32,6 +32,7 @@ import qualified Command.Init
import qualified Command.Fsck
import qualified Command.Unlock
import qualified Command.Lock
import qualified Command.PreCommit
subCmds :: [SubCommand]
subCmds =
@ -51,8 +52,8 @@ subCmds =
"initialize git-annex with repository description"
, SubCommand "unannex" path (withFilesInGit Command.Unannex.start)
"undo accidential add command"
, SubCommand "pre-commit" path (withFilesToBeCommitted Command.Fix.start)
"fix up symlinks before they are committed"
, SubCommand "pre-commit" path (withFilesToBeCommitted Command.PreCommit.start)
"run by git pre-commit hook"
, SubCommand "fromkey" key (withFilesMissing Command.FromKey.start)
"adds a file using a specific key"
, SubCommand "dropkey" key (withKeys Command.DropKey.start)

View file

@ -1,8 +1,10 @@
all: git-annex docs
ghcmake=ghc -Wall -odir build -hidir build --make
git-annex:
mkdir -p build
ghc -Wall -odir build -hidir build --make git-annex
$(ghcmake) git-annex
install:
install -d $(DESTDIR)/usr/bin
@ -17,7 +19,8 @@ IKIWIKI=ikiwiki
endif
test:
runghc test.hs
$(ghcmake) test
./test
docs:
./mdwn2man git-annex 1 doc/git-annex.mdwn > git-annex.1
@ -27,7 +30,7 @@ docs:
--disable-plugin=smiley
clean:
rm -rf build git-annex git-annex.1
rm -rf build git-annex git-annex.1 test
rm -rf doc/.ikiwiki html
.PHONY: git-annex
.PHONY: git-annex test

2
debian/changelog vendored
View file

@ -14,6 +14,8 @@ git-annex (0.04) UNRELEASED; urgency=low
* Annexed file contents are now made unwritable and put in unwriteable
directories, to avoid them accidentially being removed or modified.
(Thanks Josh Triplett for the idea.)
* Avoid using runghc to run test suite as it is not available on all
architectures. Closes: #603006
-- Joey Hess <joeyh@debian.org> Mon, 08 Nov 2010 12:36:39 -0400

View file

@ -101,7 +101,6 @@ Many git-annex subcommands will stage changes for later `git commit` by you.
Initializes git-annex with a description of the git repository,
and sets up `.gitattributes` and the pre-commit hook.
This is an optional, but recommended step.
* lock [path ...]
@ -123,7 +122,8 @@ Many git-annex subcommands will stage changes for later `git commit` by you.
* pre-commit [path ...]
Fixes up symlinks that are staged as part of a commit, to ensure they
point to annexed content. Also handles committing checked-out files.
point to annexed content. Also handles injecting changes to unlocked
files into the annex.
This is meant to be called from git's pre-commit hook. `git annex init`
automatically creates a pre-commit hook using this.

View file

@ -1,15 +1,16 @@
-- TODO find a test harness that is actually in Debian and use it.
import Test.QuickCheck
import Test.HUnit
import Test.HUnit.Tools
import GitRepo
import Locations
alltests :: [Test]
alltests = [
qctest "prop_idempotent_deencode" prop_idempotent_deencode,
qctest "prop_idempotent_fileKey" prop_idempotent_fileKey
]
main :: IO (Counts, Int)
main = runVerboseTests (TestList alltests)