disable test suite on Android

Cannot get QuickCheck to install just now.
This commit is contained in:
Joey Hess 2013-02-27 15:59:31 -04:00
parent f5676104f8
commit feb5470c0b
4 changed files with 21 additions and 2 deletions

View file

@ -77,7 +77,9 @@ import qualified Command.WebApp
import qualified Command.XMPPGit import qualified Command.XMPPGit
#endif #endif
#endif #endif
#ifdef WITH_TESTUITE
import qualified Command.Test import qualified Command.Test
#endif
cmds :: [Command] cmds :: [Command]
cmds = concat cmds = concat
@ -136,7 +138,9 @@ cmds = concat
, Command.XMPPGit.def , Command.XMPPGit.def
#endif #endif
#endif #endif
#ifdef WITH_TESTUITE
, Command.Test.def , Command.Test.def
#endif
] ]
options :: [Option] options :: [Option]

View file

@ -152,7 +152,7 @@ android:
cabal configure cabal configure
# cabal cannot cross compile with custom build type, so workaround # cabal cannot cross compile with custom build type, so workaround
sed -i 's/Build-type: Custom/Build-type: Simple/' git-annex.cabal sed -i 's/Build-type: Custom/Build-type: Simple/' git-annex.cabal
$$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin/cabal configure -f'Android Assistant -Pairing -Webapp' $$HOME/.ghc/android-14/arm-linux-androideabi-4.7/arm-linux-androideabi/bin/cabal configure -f'Android Assistant -Pairing -Webapp -TestSuite'
$(MAKE) git-annex $(MAKE) git-annex
sed -i 's/Build-type: Simple/Build-type: Custom/' git-annex.cabal sed -i 's/Build-type: Simple/Build-type: Custom/' git-annex.cabal

View file

@ -59,11 +59,14 @@ Flag Android
Description: Building for Android Description: Building for Android
Default: False Default: False
Flag TestSuite
Description: Embed the test suite into git-annex
Executable git-annex Executable git-annex
Main-Is: git-annex.hs Main-Is: git-annex.hs
Build-Depends: MissingH, hslogger, directory, filepath, Build-Depends: MissingH, hslogger, directory, filepath,
unix, containers, utf8-string, network (>= 2.0), mtl (>= 2.1.1), unix, containers, utf8-string, network (>= 2.0), mtl (>= 2.1.1),
bytestring, old-locale, time, testpack, HUnit, bytestring, old-locale, time,
extensible-exceptions, dataenc, SHA, process, json, extensible-exceptions, dataenc, SHA, process, json,
base (>= 4.5 && < 4.8), monad-control, transformers-base, lifted-base, base (>= 4.5 && < 4.8), monad-control, transformers-base, lifted-base,
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process, IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
@ -78,6 +81,10 @@ Executable git-annex
if flag(Production) if flag(Production)
GHC-Options: -O2 GHC-Options: -O2
if flag(TestSuite)
Build-Depends: testpack, HUnit
CPP-Options: -DWITH_TESTSUITE
if flag(S3) if flag(S3)
Build-Depends: hS3 Build-Depends: hS3
CPP-Options: -DWITH_S3 CPP-Options: -DWITH_S3

View file

@ -5,12 +5,16 @@
- Licensed under the GNU GPL version 3 or higher. - Licensed under the GNU GPL version 3 or higher.
-} -}
{-# LANGUAGE CPP #-}
import System.Environment import System.Environment
import System.FilePath import System.FilePath
import qualified GitAnnex import qualified GitAnnex
import qualified GitAnnexShell import qualified GitAnnexShell
#ifdef WITH_TESTUITE
import qualified Test import qualified Test
#endif
main :: IO () main :: IO ()
main = run =<< getProgName main = run =<< getProgName
@ -21,6 +25,10 @@ main = run =<< getProgName
isshell n = takeFileName n == "git-annex-shell" isshell n = takeFileName n == "git-annex-shell"
go a = do go a = do
ps <- getArgs ps <- getArgs
#ifdef WITH_TESTUITE
if ps == ["test"] if ps == ["test"]
then Test.main then Test.main
else a ps else a ps
#else
a ps
#endif