[Pkg-ocaml-maint-commits] [ocaml-visitors] 01/01: complete as-installed package test

Ralf Treinen treinen at moszumanska.debian.org
Thu May 25 09:21:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

treinen pushed a commit to branch master
in repository ocaml-visitors.

commit 6e8d4ec482f83db8aaab0ebb8fb67bf7aadad58b
Author: Ralf Treinen <treinen at free.fr>
Date:   Thu May 25 10:52:42 2017 +0200

    complete as-installed package test
---
 debian/tests/Makefile               |  5 -----
 debian/tests/control                |  2 ++
 debian/tests/weight                 | 17 +++++++++++++++++
 debian/tests/{expr.ml => weight.ml} |  0
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/debian/tests/Makefile b/debian/tests/Makefile
deleted file mode 100644
index 04e821b..0000000
--- a/debian/tests/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-expr.native expr.byte: expr.ml
-	ocamlbuild -use-ocamlfind -pkgs 'visitors.ppx,visitors.runtime' $@
-
-clean:
-	-ocamlbuild -clean
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..0f23198
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: weight
+Depends: ocaml-nox, libfindlib-ocaml
\ No newline at end of file
diff --git a/debian/tests/weight b/debian/tests/weight
new file mode 100755
index 0000000..92826d2
--- /dev/null
+++ b/debian/tests/weight
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+this=weight
+indir=debian/tests
+outdir=${ADT_ARTIFACTS:-/tmp}/${this}
+mkdir -p ${outdir}
+
+ppx='visitors.ppx,visitors.runtime'
+cp ${indir}/${this}.ml ${outdir}
+cd ${outdir}
+ocamlbuild -quiet -use-ocamlfind -pkgs ${ppx} weight.byte
+[ $(./weight.byte) -eq '16' ]
+
+if [ -x /usr/bin/ocamlopt ]
+then ocamlbuild -quiet -use-ocamlfind -pkgs ${ppx} weight.native;
+     [ $(./weight.native) -eq '16' ]
+fi
diff --git a/debian/tests/expr.ml b/debian/tests/weight.ml
similarity index 100%
rename from debian/tests/expr.ml
rename to debian/tests/weight.ml

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml-visitors.git



More information about the Pkg-ocaml-maint-commits mailing list