Move rm -rf to the beginning of the test

While the discussion about how to refactor test framework is not
finished (#1654), make this change: move `rm -rf build` in the
beginning of the test. For these reasons:

* it is useful to inspect the contents of the `build` directory
  especially after the test failure
* if build crashes mid-test (e.g. process killed), next run should
  not be affected by the `build` directory from the previous run
This commit is contained in:
Stiopa Koltsov 2021-07-13 22:54:53 +01:00
parent 9cca3a7d35
commit 9f61e542b4
463 changed files with 926 additions and 463 deletions

View File

@ -1,5 +1,6 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 "Module'.idr" < input
$1 --exec main "Module'.idr"
EDITOR=true $1 --no-banner --no-color --console-width 0 "Module'.idr" < input-ed
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 Issue735.idr < input
$1 --exec main Issue735.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --exec main Issue1200.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --exec main Issue775.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner TestException.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 BitOps.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 Test.idr < input
rm -rf build

View File

@ -1,3 +1,5 @@
rm -rf build
# @readFilePage@ uses primitive functions with definitions for both
# C (supported by most backends) and Node.
$1 --cg chez --no-color --console-width 0 --no-banner ReadFilePage.idr < input
@ -12,4 +14,3 @@ $1 --cg node --no-color --console-width 0 --no-banner ReadFilePage.idr < input
# GAMBIT hung seemingly indefinitely
# $1 --cg gambit --no-color --console-width 0 --no-banner ReadFilePage.idr < input
rm -rf build

View File

@ -1,3 +1,5 @@
rm -rf build
rm -f expected
if ! NProcs=$(nproc || sysctl -n hw.ncpu) 2>/dev/null; then
@ -9,4 +11,3 @@ echo "$NProcs processors" > expected
$1 --no-banner --no-color --console-width 0 NumProcessors.idr --exec main
rm -rf build

View File

@ -1,3 +1,5 @@
rm -rf build
case "$(uname)" in
Linux*) EXPECTED_OS=unix ;;
Darwin*) EXPECTED_OS=darwin ;;
@ -9,4 +11,3 @@ export EXPECTED_OS
$1 --no-banner --no-color --console-width 0 Os.idr --exec main
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner IgnoreSignal.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner HandleSignal.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner DefaultSignal.idr < input 2> /dev/null
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner HandleManySignals.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Test.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 BitOps.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 Casts.idr < input
rm -rf build

View File

@ -1,2 +1,3 @@
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main
rm -rf build
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main

View File

@ -1,2 +1,3 @@
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main
rm -rf build
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main

View File

@ -1,2 +1,3 @@
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main
rm -rf build
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main

View File

@ -1,2 +1,3 @@
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main
rm -rf build
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main

View File

@ -1,2 +1,3 @@
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main
rm -rf build
$1 --no-banner --no-color --console-width 0 --cg chez Main.idr --exec main

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Total.idr < input
rm -rf build

View File

@ -1,2 +1,3 @@
$1 --no-color --console-width 0 --no-banner Pythag.idr < input
rm -rf build
$1 --no-color --console-width 0 --no-banner Pythag.idr < input

View File

@ -1,2 +1,3 @@
$1 --no-color --console-width 0 --no-banner IORef.idr < input
rm -rf build
$1 --no-color --console-width 0 --no-banner IORef.idr < input

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Filter.idr < input
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner TypeCase.idr < input
$1 --no-color --console-width 0 --no-banner TypeCase2.idr --check
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner TypeCase.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Nat.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner uni.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner bangs.idr < input
rm -rf build

View File

@ -1,2 +1,3 @@
$1 --no-color --console-width 0 --no-banner array.idr < input
rm -rf build
$1 --no-color --console-width 0 --no-banner array.idr < input

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner -p network Echo.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Numbers.idr < input
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
cd "folder with spaces" || exit
$1 --no-color --console-width 0 --no-banner Main.idr < ../input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
POPEN_CMD="$1 --version" $1 --no-color --console-width 0 --no-banner Popen.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Bits.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Envy.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner runst.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner -p contrib StringParser.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 -p contrib ExpressionParser.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 BitCasts.idr < input
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 --directive extraRuntime=extensions.scm -o chez030 ExtraRuntime.idr
./build/exec/chez030
rm -rf build

View File

@ -1,5 +1,6 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 --cg chez Specifiers.idr --exec main
$1 --no-banner --no-color --console-width 0 --cg chez Specifiers.idr -o build/foo
$1 --no-banner --no-color --console-width 0 --cg chez < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 BitOps.idr < input
rm -rf build

View File

@ -1,2 +1,3 @@
$1 --no-banner --no-color --console-width 0 Main.idr --inc chez < input
rm -rf build
$1 --no-banner --no-color --console-width 0 Main.idr --inc chez < input

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 -o integers TestIntegers.idr > /dev/null
./build/exec/integers
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 IntOps.idr < input
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 -c Fact.idr -o fact
./build/exec/fact
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 numbers.idr -x main
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 -p contrib CharEncoding.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --ide-mode < input
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-color --console-width 0 --version | awk '{print $4}' | ./gen_expected.sh
$1 --no-color --console-width 0 --ide-mode < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --ide-mode < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --ide-mode < input
rm -rf build

View File

@ -1,3 +1,5 @@
rm -rf build
rm -f output*
$1 --no-color --console-width 0 --ide-mode < input1 > output1
@ -51,4 +53,3 @@ diff expectedG outputG >> output
$1 --no-color --console-width 0 --ide-mode < inputH > outputH
diff expectedH outputH >> output
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude Vect.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude Do.idr < input
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
echo ':q' | $1 --no-color --console-width 0 --no-banner --no-prelude Ambig1.idr
echo ':q' | $1 --no-color --console-width 0 --no-banner --no-prelude Ambig2.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude Wheres.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
echo ':q' | $1 --no-color --console-width 0 --no-banner --no-prelude NoInfer.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude PMLet.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude DoLocal.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude If.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude LetCase.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner --no-prelude Comp.idr < input
rm -rf build

View File

@ -1,5 +1,6 @@
rm -rf build
$1 --no-color --console-width 0 --check Dots1.idr
$1 --no-color --console-width 0 --check Dots2.idr
$1 --no-color --console-width 0 --check Dots3.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check VIndex.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check Implicits.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check Rewrite.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check George.idr
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-color --console-width 0 --check Eta.idr
$1 --no-color --console-width 0 --check Eta2.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner CaseInf.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check Fin.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner CaseBlock.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Mut.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner CaseDep.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Erase.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Params.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner PatLam.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check Erl.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check Temp.idr
rm -rf build

View File

@ -1,5 +1,6 @@
rm -rf build
unset IDRIS2_PATH
$1 --no-color --console-width 0 --no-banner --no-prelude < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Params.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check arity.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check erased.idr
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Idiom.idr < input
$1 --no-color --console-width 0 --no-banner Idiom2.idr --check
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check unboundimps.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check lets.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner using.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner defimp.idr < input
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
echo ':q' | $1 --no-color --console-width 0 --no-banner --no-prelude Comments.idr
echo ':q' | $1 --no-color --console-width 0 --no-banner Issue279.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Resugar.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --no-banner Main.idr < input
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
echo ":q" | $1 --no-color --console-width 0 --no-banner Default.idr
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-color --console-width 0 --check QDo.idr
rm -rf build

View File

@ -1,4 +1,5 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 LiteralsString.idr < input
$1 --no-banner --no-color --console-width 0 LiteralsInteger.idr < input2
rm -rf build

View File

@ -1,3 +1,4 @@
rm -rf build
$1 --no-banner --no-color --console-width 0 BitCasts.idr < input
rm -rf build

View File

@ -1,3 +1,5 @@
rm -rf build
echo ":q" | $1 --no-banner --no-color --console-width 0 --log unify.equal:10 --log unify:5 Term.idr \
| sed -E "s/[0-9]+}/N}/g" | sed -E "s/resolved([0-9]+)/resolvedN/g" \
| sed -E "s/case in ([0-9]+)/case in N/g" | sed -E "s/[0-9]+:[0-9]+/L:C/g"
@ -5,4 +7,3 @@ echo ":q" | $1 --no-banner --no-color --console-width 0 --log unify:3 --log elab
| sed -E "s/[0-9]+}/N}/g" | sed -E "s/resolved([0-9]+)/resolvedN/g" \
| sed -E "s/case in ([0-9]+)/case in N/g" | sed -E "s/[0-9]+:[0-9]+/L:C/g"
rm -rf build

Some files were not shown because too many files have changed in this diff Show More