From 9682fea9f71477af58681735d8829507991d27c5 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Wed, 21 Jun 2017 14:51:42 +0200 Subject: Make coqlib relative in test suite (revert 024a7ab20b0) --- test-suite/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test-suite') diff --git a/test-suite/Makefile b/test-suite/Makefile index 5ab4cacda..52127a45d 100644 --- a/test-suite/Makefile +++ b/test-suite/Makefile @@ -27,8 +27,8 @@ # Default value when called from a freshly compiled Coq, but can be # easily overridden -LIB := $(shell cd ..; pwd) -BIN := $(LIB)/bin/ +LIB := .. +BIN := $(shell cd ..; pwd)/bin/ coqtop := $(BIN)coqtop -coqlib $(LIB) -boot -q -batch -test-mode -R prerequisite TestSuite coqc := $(BIN)coqc -coqlib $(LIB) -R prerequisite TestSuite -- cgit v1.2.3 From 8fdc88a79837c70857c51fcb3e0930f1ac3e9c8a Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Tue, 27 Jun 2017 11:37:11 +0200 Subject: Remove non-terminating Timeout tests from Hints.v. --- test-suite/success/Hints.v | 5 ----- 1 file changed, 5 deletions(-) (limited to 'test-suite') diff --git a/test-suite/success/Hints.v b/test-suite/success/Hints.v index 1abe14774..6962e43e7 100644 --- a/test-suite/success/Hints.v +++ b/test-suite/success/Hints.v @@ -37,7 +37,6 @@ Hint Resolve predf | 0 : predconv. Goal exists n, pred n. eexists. - Fail Timeout 1 typeclasses eauto with pred. Set Typeclasses Filtered Unification. Set Typeclasses Debug Verbosity 2. (* predf is not tried as it doesn't match the goal *) @@ -80,8 +79,6 @@ Qed. (** The other way around: goal contains redexes instead of instances *) Goal exists n, pred (0 + n). eexists. - (* predf is applied indefinitely *) - Fail Timeout 1 typeclasses eauto with pred. (* pred0 (pred _) matches the goal *) typeclasses eauto with predconv. Qed. @@ -169,8 +166,6 @@ Instance foo f : E (id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ f ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id ∘ id). Proof. - Fail Timeout 1 apply _. (* 3.7s *) - Hint Cut [_* (a_is_b | b_is_c | c_is_d | d_is_e) (a_compose | b_compose | c_compose | d_compose | e_compose)] : typeclass_instances. -- cgit v1.2.3 From d70b9e9b901a836f80180200cfd591e05839ee28 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Tue, 27 Jun 2017 16:03:58 +0200 Subject: Print failure logs on appveyor. --- test-suite/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'test-suite') diff --git a/test-suite/Makefile b/test-suite/Makefile index 52127a45d..3db345241 100644 --- a/test-suite/Makefile +++ b/test-suite/Makefile @@ -170,6 +170,7 @@ summary.log: report: summary.log $(HIDE)./save-logs.sh $(HIDE)if [ -n "${TRAVIS}" ]; then find logs/ -name '*.log' -not -name 'summary.log' -exec 'bash' '-c' 'echo "travis_fold:start:coq.logs.$$(echo '{}' | sed s,/,.,g)"' ';' -exec cat '{}' ';' -exec 'bash' '-c' 'echo "travis_fold:end:coq.logs.$$(echo '{}' | sed s,/,.,g)"' ';'; fi + $(HIDE)if [ -n "${APPVEYOR}" ]; then find logs/ -name '*.log' -not -name 'summary.log' -exec 'bash' '-c' 'echo {}' ';' -exec cat '{}' ';' -exec 'bash' '-c' 'echo' ';'; fi $(HIDE)if grep -q -F 'Error!' summary.log ; then echo FAILURES; grep -F 'Error!' summary.log; false; else echo NO FAILURES; fi ####################################################################### -- cgit v1.2.3 From e61ccdcf8d30b2d9998ba4851ea7691114977b57 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Tue, 27 Jun 2017 17:17:59 +0200 Subject: Remove trailing CR before diff in output and misc tests. --- test-suite/Makefile | 4 ++-- test-suite/misc/deps-order.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test-suite') diff --git a/test-suite/Makefile b/test-suite/Makefile index 3db345241..a88fb6bc6 100644 --- a/test-suite/Makefile +++ b/test-suite/Makefile @@ -294,7 +294,7 @@ $(addsuffix .log,$(wildcard output/*.v)): %.v.log: %.v %.out $(PREREQUISITELOG) | grep -v "^" \ | sed 's/File "[^"]*"/File "stdin"/' \ > $$tmpoutput; \ - diff -u $*.out $$tmpoutput 2>&1; R=$$?; times; \ + diff -u --strip-trailing-cr $*.out $$tmpoutput 2>&1; R=$$?; times; \ if [ $$R = 0 ]; then \ echo $(log_success); \ echo " $<...Ok"; \ @@ -329,7 +329,7 @@ $(addsuffix .log,$(wildcard output-modulo-time/*.v)): %.v.log: %.v %.out -e 's/\s*[-+]inf\s*//g' \ -e 's/^[^a-zA-Z]*//' \ $*.out | sort > $$tmpexpected; \ - diff -b -u $$tmpexpected $$tmpoutput 2>&1; R=$$?; times; \ + diff --strip-trailing-cr -b -u $$tmpexpected $$tmpoutput 2>&1; R=$$?; times; \ if [ $$R = 0 ]; then \ echo $(log_success); \ echo " $<...Ok"; \ diff --git a/test-suite/misc/deps-order.sh b/test-suite/misc/deps-order.sh index 00c5eb1bd..299f49469 100755 --- a/test-suite/misc/deps-order.sh +++ b/test-suite/misc/deps-order.sh @@ -4,7 +4,7 @@ rm -f misc/deps/lib/*.vo misc/deps/client/*.vo tmpoutput=`mktemp /tmp/coqcheck.XXXXXX` $coqdep -R misc/deps/lib lib -R misc/deps/client client misc/deps/client/bar.v 2>&1 | head -n 1 > $tmpoutput -diff -u misc/deps/deps.out $tmpoutput 2>&1 +diff -u --strip-trailing-cr misc/deps/deps.out $tmpoutput 2>&1 R=$? times $coqc -R misc/deps/lib lib misc/deps/lib/foo.v 2>&1 -- cgit v1.2.3 From 7f7075d10780fe24c97e329868a501c2af422625 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 17 Jul 2017 10:50:04 +0200 Subject: coq-makefile: make test suite detect more errors Replacing ; with && and enabling bash's pipefail option --- test-suite/coq-makefile/arg/run.sh | 3 --- test-suite/coq-makefile/compat-subdirs/run.sh | 4 +--- test-suite/coq-makefile/coqdoc1/run.sh | 5 +---- test-suite/coq-makefile/coqdoc2/run.sh | 5 +---- test-suite/coq-makefile/extend-subdirs/run.sh | 3 --- test-suite/coq-makefile/latex1/run.sh | 3 --- test-suite/coq-makefile/merlin1/run.sh | 3 --- test-suite/coq-makefile/mlpack1/run.sh | 5 +---- test-suite/coq-makefile/mlpack2/run.sh | 5 +---- test-suite/coq-makefile/multiroot/run.sh | 5 +---- test-suite/coq-makefile/native1/run.sh | 5 +---- test-suite/coq-makefile/only/run.sh | 3 --- test-suite/coq-makefile/plugin1/run.sh | 5 +---- test-suite/coq-makefile/plugin2/run.sh | 5 +---- test-suite/coq-makefile/plugin3/run.sh | 5 +---- test-suite/coq-makefile/template/init.sh | 2 ++ test-suite/coq-makefile/uninstall1/run.sh | 5 +---- test-suite/coq-makefile/uninstall2/run.sh | 5 +---- test-suite/coq-makefile/validate1/run.sh | 3 --- 19 files changed, 14 insertions(+), 65 deletions(-) (limited to 'test-suite') diff --git a/test-suite/coq-makefile/arg/run.sh b/test-suite/coq-makefile/arg/run.sh index e98da17c7..aa0f50001 100755 --- a/test-suite/coq-makefile/arg/run.sh +++ b/test-suite/coq-makefile/arg/run.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -#set -x -set -e - . ../template/init.sh coq_makefile -f _CoqProject -o Makefile diff --git a/test-suite/coq-makefile/compat-subdirs/run.sh b/test-suite/coq-makefile/compat-subdirs/run.sh index 28d9878f9..211f73adc 100755 --- a/test-suite/coq-makefile/compat-subdirs/run.sh +++ b/test-suite/coq-makefile/compat-subdirs/run.sh @@ -1,9 +1,7 @@ #!/usr/bin/env bash -#set -x -set -e - . ../template/init.sh + coq_makefile -f _CoqProject -o Makefile make exec test -f "subdir/done" diff --git a/test-suite/coq-makefile/coqdoc1/run.sh b/test-suite/coq-makefile/coqdoc1/run.sh index e8291c89d..78e30bd35 100755 --- a/test-suite/coq-makefile/coqdoc1/run.sh +++ b/test-suite/coq-makefile/coqdoc1/run.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -#set -x -set -e - . ../template/init.sh coq_makefile -f _CoqProject -o Makefile @@ -11,7 +8,7 @@ make html mlihtml make install DSTROOT="$PWD/tmp" make install-doc DSTROOT="$PWD/tmp" #make debug -(for d in `find tmp -name user-contrib`; do pushd $d >/dev/null; find .; popd >/dev/null; done) | sort -u > actual +(for d in `find tmp -name user-contrib` ; do pushd $d >/dev/null && find . && popd >/dev/null; done) | sort -u > actual sort -u > desired </dev/null; find .; popd >/dev/null; done) | sort -u > actual +(for d in `find tmp -name user-contrib` ; do pushd $d >/dev/null && find . && popd >/dev/null; done) | sort -u > actual sort -u > desired < actual +(cd `find tmp -name user-contrib` && find .) | sort > actual sort > desired < actual +(cd `find tmp -name user-contrib` && find .) | sort > actual sort > desired </dev/null; find .; popd >/dev/null; done) | sort -u > actual +(for d in `find tmp -name user-contrib` ; do pushd $d >/dev/null && find . && popd >/dev/null; done) | sort -u > actual sort > desired < actual +(cd `find tmp -name user-contrib` && find .) | sort > actual sort > desired < actual +(cd `find tmp -name user-contrib` && find .) | sort > actual sort > desired < actual +(cd `find tmp -name user-contrib` && find .) | sort > actual sort > desired < actual +(cd `find tmp -name user-contrib` && find .) | sort > actual sort > desired </dev/null; find .; popd >/dev/null; done) | sort -u > actual +(for d in `find tmp -name user-contrib` ; do pushd $d >/dev/null && find . && popd >/dev/null; done) | sort -u > actual sort -u > desired </dev/null; find .; popd >/dev/null; done) | sort -u > actual +(for d in `find tmp -name user-contrib` ; do pushd $d >/dev/null && find . && popd >/dev/null; done) | sort -u > actual sort -u > desired < Date: Mon, 17 Jul 2017 14:03:35 +0200 Subject: more verbose logs for coq-makefile --- test-suite/coq-makefile/arg/run.sh | 1 + test-suite/coq-makefile/compat-subdirs/run.sh | 1 + test-suite/coq-makefile/coqdoc1/run.sh | 1 + test-suite/coq-makefile/coqdoc2/run.sh | 1 + test-suite/coq-makefile/extend-subdirs/run.sh | 1 + test-suite/coq-makefile/latex1/run.sh | 1 + test-suite/coq-makefile/merlin1/run.sh | 1 + test-suite/coq-makefile/mlpack1/run.sh | 1 + test-suite/coq-makefile/mlpack2/run.sh | 1 + test-suite/coq-makefile/multiroot/run.sh | 1 + test-suite/coq-makefile/native1/run.sh | 1 + test-suite/coq-makefile/only/run.sh | 1 + test-suite/coq-makefile/plugin-reach-outside-API-and-fail/run.sh | 1 + .../plugin-reach-outside-API-and-succeed-by-bypassing-the-API/run.sh | 1 + test-suite/coq-makefile/plugin1/run.sh | 1 + test-suite/coq-makefile/plugin2/run.sh | 1 + test-suite/coq-makefile/plugin3/run.sh | 1 + test-suite/coq-makefile/uninstall1/run.sh | 1 + test-suite/coq-makefile/uninstall2/run.sh | 1 + test-suite/coq-makefile/validate1/run.sh | 1 + 20 files changed, 20 insertions(+) (limited to 'test-suite') diff --git a/test-suite/coq-makefile/arg/run.sh b/test-suite/coq-makefile/arg/run.sh index aa0f50001..e7de90ff2 100755 --- a/test-suite/coq-makefile/arg/run.sh +++ b/test-suite/coq-makefile/arg/run.sh @@ -3,4 +3,5 @@ . ../template/init.sh coq_makefile -f _CoqProject -o Makefile +cat Makefile.conf make diff --git a/test-suite/coq-makefile/compat-subdirs/run.sh b/test-suite/coq-makefile/compat-subdirs/run.sh index 211f73adc..221dcd7bf 100755 --- a/test-suite/coq-makefile/compat-subdirs/run.sh +++ b/test-suite/coq-makefile/compat-subdirs/run.sh @@ -3,5 +3,6 @@ . ../template/init.sh coq_makefile -f _CoqProject -o Makefile +cat Makefile.conf make exec test -f "subdir/done" diff --git a/test-suite/coq-makefile/coqdoc1/run.sh b/test-suite/coq-makefile/coqdoc1/run.sh index 78e30bd35..1feff7479 100755 --- a/test-suite/coq-makefile/coqdoc1/run.sh +++ b/test-suite/coq-makefile/coqdoc1/run.sh @@ -3,6 +3,7 @@ . ../template/init.sh coq_makefile -f _CoqProject -o Makefile +cat Makefile.conf make make html mlihtml make install DSTROOT="$PWD/tmp" diff --git a/test-suite/coq-makefile/coqdoc2/run.sh b/test-suite/coq-makefile/coqdoc2/run.sh index 78e30bd35..1feff7479 100755 --- a/test-suite/coq-makefile/coqdoc2/run.sh +++ b/test-suite/coq-makefile/coqdoc2/run.sh @@ -3,6 +3,7 @@ . ../template/init.sh coq_makefile -f _CoqProject -o Makefile +cat Makefile.conf make make html mlihtml make install DSTROOT="$PWD/tmp" diff --git a/test-suite/coq-makefile/extend-subdirs/run.sh b/test-suite/coq-makefile/extend-subdirs/run.sh index 211f73adc..221dcd7bf 100755 --- a/test-suite/coq-makefile/extend-subdirs/run.sh +++ b/test-suite/coq-makefile/extend-subdirs/run.sh @@ -3,5 +3,6 @@ . ../template/init.sh coq_makefile -f _CoqProject -o Makefile +cat Makefile.conf make exec test -f "subdir/done" diff --git a/test-suite/coq-makefile/latex1/run.sh b/test-suite/coq-makefile/latex1/run.sh index 5337ca295..b2c5d5669 100755 --- a/test-suite/coq-makefile/latex1/run.sh +++ b/test-suite/coq-makefile/latex1/run.sh @@ -5,6 +5,7 @@ if which pdflatex; then . ../template/init.sh coq_makefile -f _CoqProject -o Makefile +cat Makefile.conf make exec make all.pdf diff --git a/test-suite/coq-makefile/merlin1/run.sh b/test-suite/coq-makefile/merlin1/run.sh index 37c5ab5c4..1f262a939 100755 --- a/test-suite/coq-makefile/merlin1/run.sh +++ b/test-suite/coq-makefile/merlin1/run.sh @@ -3,6 +3,7 @@ . ../template/init.sh coq_makefile -f _CoqProject -o Makefile +cat Makefile.conf make .merlin cat > desired < Date: Wed, 19 Jul 2017 12:55:39 +0200 Subject: fake_ide: do as coqide to find out coqtop path --- test-suite/Makefile | 2 +- tools/fake_ide.ml | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'test-suite') diff --git a/test-suite/Makefile b/test-suite/Makefile index a88fb6bc6..beb80a3df 100644 --- a/test-suite/Makefile +++ b/test-suite/Makefile @@ -446,7 +446,7 @@ ide : $(patsubst %.fake,%.fake.log,$(wildcard ide/*.fake)) @echo "TEST $<" $(HIDE){ \ echo $(call log_intro,$<); \ - $(BIN)fake_ide $< "$(BIN)coqtop -coqlib $(LIB) -boot -async-proofs on -async-proofs-tactic-error-resilience off -async-proofs-command-error-resilience off" 2>&1; \ + $(BIN)fake_ide $< "-coqlib $(LIB) -boot -async-proofs on -async-proofs-tactic-error-resilience off -async-proofs-command-error-resilience off" 2>&1; \ if [ $$? = 0 ]; then \ echo $(log_success); \ echo " $<...Ok"; \ diff --git a/tools/fake_ide.ml b/tools/fake_ide.ml index 258633d29..a9da27ba2 100644 --- a/tools/fake_ide.ml +++ b/tools/fake_ide.ml @@ -297,12 +297,24 @@ let main = (Sys.Signal_handle (fun _ -> prerr_endline "Broken Pipe (coqtop died ?)"; exit 1)); let def_args = ["--xml_format=Ppcmds"; "-ideslave"] in - let coqtop_name, coqtop_args, input_file = match Sys.argv with - | [| _; f |] -> (if Sys.os_type = "Unix" then "coqtop" else "coqtop.exe"), - Array.of_list def_args, f + let coqtop_name = (* from ide/ideutils.ml *) + let prog_name = "fake_ide" in + let len_prog_name = String.length prog_name in + let fake_ide_path = Sys.executable_name in + let fake_ide_path_len = String.length fake_ide_path in + let pos = fake_ide_path_len - len_prog_name in + let rex = Str.regexp_string prog_name in + try + let i = Str.search_backward rex fake_ide_path pos in + String.sub fake_ide_path 0 i ^ "coqtop" ^ + String.sub fake_ide_path (i + len_prog_name) + (fake_ide_path_len - i - len_prog_name) + with Not_found -> assert false in + let coqtop_args, input_file = match Sys.argv with + | [| _; f |] -> Array.of_list def_args, f | [| _; f; ct |] -> let ct = Str.split (Str.regexp " ") ct in - List.hd ct, Array.of_list (def_args @ List.tl ct), f + Array.of_list (def_args @ ct), f | _ -> usage () in let inc = if input_file = "-" then stdin else open_in input_file in let coq = -- cgit v1.2.3