[tor-commits] [tordnsel/master] Build tests

arlo at torproject.org arlo at torproject.org
Sat Apr 16 06:08:44 UTC 2016


commit 80ef12016bf5f5574d306b9edd14d90e8cba7daf
Author: Arlo Breault <arlolra at gmail.com>
Date:   Fri Apr 15 21:59:50 2016 -0700

    Build tests
---
 .travis.yml                  |  4 ++++
 src/TorDNSEL/Config/Tests.hs | 10 +++++-----
 tordnsel.cabal               | 18 ++++++++++++++++--
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index ca0dd47..66ff6df 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,3 +2,7 @@ language: haskell
 
 ghc:
     - 7.6
+
+script:
+    - cabal configure --enable-tests --ghc-options="-fno-warn-unused-do-bind" && cabal build
+    - ./dist/build/runtests/runtests
diff --git a/src/TorDNSEL/Config/Tests.hs b/src/TorDNSEL/Config/Tests.hs
index e7b9a54..5065b54 100644
--- a/src/TorDNSEL/Config/Tests.hs
+++ b/src/TorDNSEL/Config/Tests.hs
@@ -37,7 +37,7 @@ config = toConfig
   [ "ZoneOfAuthority"        ~> "exitlist.example.com."
   , "DomainName"             ~> "exitlist-ns.example.com."
   , "SOARName"               ~> "hostmaster.example.com."
-  , "StateDirectory"         ~> "/state"
+  , "StateDirectory"         ~> "/state/"
   , "RuntimeDirectory"       ~> "/srv/tordnsel/run/"
   , "DNSListenAddress"       ~> "127.0.0.1:53"
   , "Address"                ~> "10.0.0.1"
@@ -78,10 +78,10 @@ configFile =
   \\n\
   \## Store exit test results in this directory. This should be an absolute\n\
   \## path accessible inside the chroot (if one is configured).\n\
-  \#StateDirectory /srv/tordnsel/state\n\
+  \#StateDirectory /srv/tordnsel/state/\n\
   \## This line is equivalent to the previous line if you've specified\n\
-  \## ChangeRootDirectory as /srv/tordnsel.\n\
-  \StateDirectory /state\n\
+  \## ChangeRootDirectory as /srv/tordnsel/.\n\
+  \StateDirectory /state/\n\
   \\n\
   \## Place the statistics and reconfigure sockets in this directory before\n\
   \## chrooting or dropping privileges.\n\
@@ -138,7 +138,7 @@ configFile =
   \\n\
   \## Call chroot(2) to change our root directory. This option also requires\n\
   \## root privileges.\n\
-  \ChangeRootDirectory /srv/tordnsel\n\
+  \ChangeRootDirectory /srv/tordnsel/\n\
   \\n\
   \## Write our PID to the specified file before chrooting or dropping\n\
   \## privileges. This file won't be removed on exit.\n\
diff --git a/tordnsel.cabal b/tordnsel.cabal
index 177f7f4..39a1341 100644
--- a/tordnsel.cabal
+++ b/tordnsel.cabal
@@ -77,13 +77,27 @@ Extensions:      FlexibleContexts
                  StandaloneDeriving
 
 Executable:      runtests
-Buildable:       False
+Buildable:       True
 Main-Is:         runtests.hs
 Other-Modules:   TorDNSEL.Config.Tests
                  TorDNSEL.Directory.Tests
                  TorDNSEL.DNS.Tests
                  TorDNSEL.DNS.Server.Tests
+                 TorDNSEL.Util
+                 TorDNSEL.Log.Internals
+Extensions:      FlexibleContexts
+                 FlexibleInstances
+                 TypeSynonymInstances
+                 MultiParamTypeClasses
+                 PatternGuards
+                 BangPatterns
+                 ViewPatterns
+                 ScopedTypeVariables
+                 DeriveDataTypeable
+                 GeneralizedNewtypeDeriving
+                 Rank2Types
+                 StandaloneDeriving
 HS-Source-Dirs:  src
 Includes:        netinet/in.h, openssl/rand.h
 Extra-Libraries: crypto
-GHC-Options:     -Wall -Werror -fno-warn-missing-signatures
+GHC-Options:     -Wall -fno-warn-missing-signatures



More information about the tor-commits mailing list