File tree Expand file tree Collapse file tree 10 files changed +56
-17
lines changed
Expand file tree Collapse file tree 10 files changed +56
-17
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ GHC_EXEC ?= ghc
33CABAL ?= cabal
44CABAL_OPTIONS ?= --with-compiler $(GHC_EXEC )
55
6- runtests : runtests.agda
7- rm -f _build/runtests
8- rm -f _build/MAlonzo/Code/Qruntests*
9- $(AGDA ) --compile-dir=_build/ -c --ghc-dont-call-ghc runtests.agda
10- $(CABAL ) build $(CABAL_OPTIONS )
6+ AGDA_BUILD_DIR = _config/_build
7+ CABAL_BUILD_DIR = _config/dist-newstyle
118
12- test : runtests
13- $( CABAL ) exec $( CABAL_OPTIONS ) runtests -- $( AGDA_EXEC ) $( INTERACTIVE ) --timing --failure-file failures --only $( only )
9+ ./runtests : admin/ runtests/runtests.agda
10+ cd admin/ runtests && sh run
1411
12+ test : ./runtests
13+ ./runtests " $( AGDA) " $(INTERACTIVE ) --timing --failure-file failures --only $(only )
1514
16- retest : runtests
17- $(CABAL ) exec $(CABAL_OPTIONS ) runtests -- $(AGDA_EXEC ) $(INTERACTIVE ) --timing --failure-file failures --only-file failures --only $(only )
15+
16+ retest : ./runtests
17+ ./runtests " $( AGDA) " $(INTERACTIVE ) --timing --failure-file failures --only-file failures --only $(only )
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ goldenTest () {
4040 ln -sf " $CABAL_BUILD_DIR " dist-newstyle
4141
4242 # Compile the Agda module and build the generated code
43- $AGDA --compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
43+ $AGDA --library-file=../../_config/libraries -- compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
4444 cabal build " $TEST_NAME " --with-compiler " $GHC_EXEC " > logs/cabal-build
4545
4646 # Run the test
Original file line number Diff line number Diff line change 1+ ../../../standard-library.agda-lib
Original file line number Diff line number Diff line change 11name: TEST_NAME
2- include: ../../../src/ .
2+ include: .
3+ depend: standard-library
34flags:
45 --warning=noUnsupportedIndexedMatch
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ if [ -z ${AGDA_EXEC} ]; then
6+ export AGDA_EXEC=agda-2.6.4
7+ fi
8+
9+ if [ -z ${GHC_EXEC} ]; then
10+ export GHC_EXEC=ghc-9.2.8
11+ fi
12+
13+ TEST_NAME=runtests
14+
15+ # Specialise template agda-lib
16+ sed " s/TEST_NAME/$TEST_NAME /g" ../../_config/template.agda-lib > " $TEST_NAME " .agda-lib
17+
18+ # Set up clean logs directory
19+ rm -rf logs/
20+ mkdir logs
21+
22+ # Use shared directories to avoid rechecking stdlib modules
23+ AGDA_BUILD_DIR=../../_config/_build
24+ CABAL_BUILD_DIR=../../_config/dist-newstyle
25+
26+ mkdir -p " $AGDA_BUILD_DIR "
27+ ln -sf " $AGDA_BUILD_DIR " _build
28+ mkdir -p " $CABAL_BUILD_DIR "
29+ ln -sf " $CABAL_BUILD_DIR " dist-newstyle
30+
31+ # Compile the Agda module and build the generated code
32+ $AGDA --library-file ../../_config/libraries --compile-dir=_build -c --ghc-dont-call-ghc runtests.agda > logs/agda-build
33+ cabal build " $TEST_NAME " --with-compiler " $GHC_EXEC " > logs/cabal-build
34+
35+ # Copy the executable to the test root directory
36+ cp $( find dist-newstyle/ -name " runtests" -type f) ../../
37+
38+ # Clean up after ourselves
39+ rm " $TEST_NAME " .agda-lib
40+ rm _build
41+ rm dist-newstyle
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ mkdir -p "$CABAL_BUILD_DIR"
2020ln -sf "$CABAL_BUILD_DIR" dist-newstyle
2121
2222# Compile the Agda module and build the generated code
23- $1 --compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
23+ $1 --library-file ../../_config/libraries -- compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
2424cabal build "$TEST_NAME" --with-compiler "$GHC_EXEC" > logs/cabal-build
2525
2626# Run the test
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ mkdir -p "$CABAL_BUILD_DIR"
2121ln -sf "$CABAL_BUILD_DIR" dist-newstyle
2222
2323# Compile the Agda module and build the generated code
24- $1 --compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
24+ $1 --library-file ../../_config/libraries -- compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
2525cabal build "$TEST_NAME" --with-compiler "$GHC_EXEC" > logs/cabal-build
2626
2727# Run the test
You can’t perform that action at this time.
0 commit comments