Check hadrian/ghci.sh script output to determine pass/fail
authorMatthew Pickering <matthewtpickering@gmail.com>
Sun, 17 Mar 2019 10:24:31 +0000 (10:24 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Mon, 25 Mar 2019 18:02:25 +0000 (14:02 -0400)
ghci always exits with exit code 0 so you have to check the output
to see if the modules loaded succesfully.

.gitlab-ci.yml

index ba90191..a30c407 100644 (file)
@@ -149,8 +149,8 @@ hadrian-ghc-in-ghci:
     - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
     - ./boot
     - ./configure $CONFIGURE_ARGS
-    # Load ghc-in-ghci then immediately exit
-    - echo ":q" | hadrian/ghci.sh
+    # Load ghc-in-ghci then immediately exit and check the modules loaded
+    - echo ":q" | hadrian/ghci.sh | tail -n2 | grep "Ok,"
   cache:
     key: hadrian-ghci
     paths: