[commit: packages/directory] Mistuke-bump-win32-version-bounds, bgamari-patch-1, master: Use PREBUILD scripts in CI (a22238b)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:34:37 UTC 2017


Repository : ssh://git@git.haskell.org/directory

On branches: Mistuke-bump-win32-version-bounds,bgamari-patch-1,master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a22238bdf93ac94f4ccbfe70779c33f10d52fdba/directory

>---------------------------------------------------------------

commit a22238bdf93ac94f4ccbfe70779c33f10d52fdba
Author: Phil Ruffwind <rf at rufflewind.com>
Date:   Tue Nov 29 22:12:25 2016 -0500

    Use PREBUILD scripts in CI
    
    The PREBUILD environment variable is executed as a script before the
    build, allowing modifications to configure.ac to emulate missing
    features.


>---------------------------------------------------------------

a22238bdf93ac94f4ccbfe70779c33f10d52fdba
 .travis.yml      |  3 ++-
 appveyor.yml     |  1 +
 tools/testscript | 11 ++---------
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 77b1e51..f75bbfa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,8 @@ matrix:
   # CABALVER=1.16 is the earliest available in the PPA
   - env: STACK="stack --resolver lts-5"
     os: osx
-  - env: GHCVER=7.4.2 CABALVER=1.16 DISABLE_UTIMENSAT=t
+  - env: GHCVER=7.4.2 CABALVER=1.16
+      PREBUILD="sed -i.bak /utimensat/d configure.ac"
     addons:
       apt:
         packages: [ghc-7.4.2, cabal-install-1.16]
diff --git a/appveyor.yml b/appveyor.yml
index ece24a1..17cba1e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -13,6 +13,7 @@ environment:
     STACK: stack --skip-msys --resolver lts-5
   - DEPS: Win32-2.3.0.1
     STACK: stack --skip-msys --resolver lts-2
+    PREBUILD: sed -i.bak /GetFinalPathNameByHandleW/d configure.ac
 cache:
 - "%STACK_ROOT%"
 install:
diff --git a/tools/testscript b/tools/testscript
index 93e30d7..85799bd 100755
--- a/tools/testscript
+++ b/tools/testscript
@@ -12,14 +12,8 @@ before_build() {
     fi
 }
 
-after_cabal_configure() {
-    # this hook is only executed in the Cabal case
-    if [ "${DISABLE_UTIMENSAT+x}" ]; then
-        sed -i.bak "s/#define HAVE_UTIMENSAT 1//" HsDirectoryConfig.h
-    fi
-}
-
 prepare() {
+    eval "${PREBUILD-}"
     if [ "${STACK+x}" ]; then
 
         stack="$STACK --no-terminal"
@@ -115,12 +109,11 @@ build() {
 
         testflags=`printf " %s" "$testflags" | sed "s/ / --test-option=/g"`
         cabal configure -v2 --enable-tests --ghc-options="$ghcflags"
-        after_cabal_configure
         cabal build
+        cabal test --show-details="$streaming" $testflags
         cabal check
         cabal sdist
         cabal copy
-        cabal test --show-details="$streaming" $testflags
         cabal_install_run_tests dist/*-*.tar.gz --force-reinstalls
 
     fi



More information about the ghc-commits mailing list