aboutsummaryrefslogtreecommitdiff
path: root/test-suite/coq-makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/coq-makefile')
-rw-r--r--test-suite/coq-makefile/findlib-package-unpacked/Makefile.local1
-rw-r--r--test-suite/coq-makefile/findlib-package-unpacked/_CoqProject10
-rw-r--r--test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/META4
-rw-r--r--test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/Makefile14
-rw-r--r--test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foo.mli0
-rw-r--r--test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foolib.ml2
-rwxr-xr-xtest-suite/coq-makefile/findlib-package-unpacked/run.sh20
-rwxr-xr-xtest-suite/coq-makefile/timing/precomputed-time-tests/003-non-utf8/run.sh18
8 files changed, 57 insertions, 12 deletions
diff --git a/test-suite/coq-makefile/findlib-package-unpacked/Makefile.local b/test-suite/coq-makefile/findlib-package-unpacked/Makefile.local
new file mode 100644
index 0000000000..0f4a7d9954
--- /dev/null
+++ b/test-suite/coq-makefile/findlib-package-unpacked/Makefile.local
@@ -0,0 +1 @@
+CAMLPKGS += -package foo
diff --git a/test-suite/coq-makefile/findlib-package-unpacked/_CoqProject b/test-suite/coq-makefile/findlib-package-unpacked/_CoqProject
new file mode 100644
index 0000000000..cbdb43f842
--- /dev/null
+++ b/test-suite/coq-makefile/findlib-package-unpacked/_CoqProject
@@ -0,0 +1,10 @@
+-R src test
+-R theories test
+-I src
+
+src/test_plugin.mllib
+src/test.mlg
+src/test.mli
+src/test_aux.ml
+src/test_aux.mli
+theories/test.v
diff --git a/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/META b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/META
new file mode 100644
index 0000000000..ff5f1c7c96
--- /dev/null
+++ b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/META
@@ -0,0 +1,4 @@
+archive(byte)="foo.cma"
+archive(native)="foo.cmxa"
+linkopts="-linkall"
+requires="str"
diff --git a/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/Makefile b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/Makefile
new file mode 100644
index 0000000000..1615bfd067
--- /dev/null
+++ b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/Makefile
@@ -0,0 +1,14 @@
+-include ../../Makefile.conf
+
+CO="$(COQMF_OCAMLFIND)" opt
+CB="$(COQMF_OCAMLFIND)" ocamlc
+
+all:
+ $(CO) -c foolib.ml
+ $(CO) -a foolib.cmx -o foo.cmxa
+ $(CB) -c foolib.ml
+ $(CB) -a foolib.cmo -o foo.cma
+ $(CB) -c foo.mli # empty .mli file, to be understood
+
+clean:
+ rm -f *.cmo *.cma *.cmx *.cmxa *.cmi *.o *.a
diff --git a/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foo.mli b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foo.mli
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foo.mli
diff --git a/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foolib.ml b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foolib.ml
new file mode 100644
index 0000000000..81306fb89b
--- /dev/null
+++ b/test-suite/coq-makefile/findlib-package-unpacked/findlib/foo/foolib.ml
@@ -0,0 +1,2 @@
+let foo () =
+ assert(Str.search_forward (Str.regexp "foo") "barfoobar" 0 = 3)
diff --git a/test-suite/coq-makefile/findlib-package-unpacked/run.sh b/test-suite/coq-makefile/findlib-package-unpacked/run.sh
new file mode 100755
index 0000000000..e53a7ed0f7
--- /dev/null
+++ b/test-suite/coq-makefile/findlib-package-unpacked/run.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+. ../template/init.sh
+mv src/test_plugin.mlpack src/test_plugin.mllib
+
+echo "let () = Foolib.foo ();;" >> src/test_aux.ml
+export OCAMLPATH=$OCAMLPATH:$PWD/findlib
+if which cygpath 2>/dev/null; then
+ # the only way I found to pass OCAMLPATH on win is to have it contain
+ # only one entry
+ OCAMLPATH=$(cygpath -w "$PWD"/findlib)
+ export OCAMLPATH
+fi
+make -C findlib/foo clean
+coq_makefile -f _CoqProject -o Makefile
+cat Makefile.conf
+cat Makefile.local
+make -C findlib/foo
+make
+make byte
diff --git a/test-suite/coq-makefile/timing/precomputed-time-tests/003-non-utf8/run.sh b/test-suite/coq-makefile/timing/precomputed-time-tests/003-non-utf8/run.sh
index e1f17725dc..13e484b852 100755
--- a/test-suite/coq-makefile/timing/precomputed-time-tests/003-non-utf8/run.sh
+++ b/test-suite/coq-makefile/timing/precomputed-time-tests/003-non-utf8/run.sh
@@ -5,20 +5,14 @@ set -e
cd "$(dirname "${BASH_SOURCE[0]}")"
-python2 "$COQLIB"/tools/make-one-time-file.py time-of-build.log.in time-of-build-pretty.log2 || exit $?
-python3 "$COQLIB"/tools/make-one-time-file.py time-of-build.log.in time-of-build-pretty.log3 || exit $?
+"$COQLIB"/tools/make-one-time-file.py time-of-build.log.in time-of-build-pretty.log || exit $?
-diff -u time-of-build-pretty.log.expected time-of-build-pretty.log2 || exit $?
-diff -u time-of-build-pretty.log.expected time-of-build-pretty.log3 || exit $?
+diff -u time-of-build-pretty.log.expected time-of-build-pretty.log || exit $?
-cat time-of-build.log.in | python2 "$COQLIB"/tools/make-one-time-file.py - time-of-build-pretty.log2 || exit $?
-cat time-of-build.log.in | python3 "$COQLIB"/tools/make-one-time-file.py - time-of-build-pretty.log3 || exit $?
+cat time-of-build.log.in | "$COQLIB"/tools/make-one-time-file.py - time-of-build-pretty.log || exit $?
-diff -u time-of-build-pretty.log.expected time-of-build-pretty.log2 || exit $?
-diff -u time-of-build-pretty.log.expected time-of-build-pretty.log3 || exit $?
+diff -u time-of-build-pretty.log.expected time-of-build-pretty.log || exit $?
-(python2 "$COQLIB"/tools/make-one-time-file.py time-of-build.log.in - || exit $?) > time-of-build-pretty.log2
-(python3 "$COQLIB"/tools/make-one-time-file.py time-of-build.log.in - || exit $?) > time-of-build-pretty.log3
+("$COQLIB"/tools/make-one-time-file.py time-of-build.log.in - || exit $?) > time-of-build-pretty.log
-diff -u time-of-build-pretty.log.expected time-of-build-pretty.log2 || exit $?
-diff -u time-of-build-pretty.log.expected time-of-build-pretty.log3 || exit $?
+diff -u time-of-build-pretty.log.expected time-of-build-pretty.log || exit $?