[Pkg-ocaml-maint-commits] [tuareg-mode] 08/08: add package test

Ralf Treinen treinen at moszumanska.debian.org
Sun Mar 22 14:56:01 UTC 2015


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

treinen pushed a commit to branch experimental/master
in repository tuareg-mode.

commit e4b729441f48345ad412dd113d8e491ed7e3f60a
Author: Ralf Treinen <treinen at free.fr>
Date:   Sun Mar 22 15:47:52 2015 +0100

    add package test
---
 debian/changelog      |  3 ++-
 debian/control        |  1 +
 debian/tests/control  |  3 +++
 debian/tests/upstream | 22 ++++++++++++++++++++++
 4 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 588060a..ce68e9b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,8 +10,9 @@ tuareg-mode (1:2.0.9-1) experimental; urgency=medium
   * debian/tuareg-mode.docs: README is now README.md
   * debian/watch: switch to new upstream site at github.
   * Standards-version 3.9.6 (no change)
+  * add DEP8-style package test
 
- -- Ralf Treinen <treinen at debian.org>  Sun, 22 Mar 2015 09:55:39 +0100
+ -- Ralf Treinen <treinen at debian.org>  Sun, 22 Mar 2015 15:46:28 +0100
 
 tuareg-mode (1:2.0.7-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 0fd0a22..81c8ca4 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Standards-Version: 3.9.6
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/tuareg-mode.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/tuareg-mode.git
 Homepage: http://tuareg.forge.ocamlcore.org/
+XS-Testsuite: autopkgtest
 
 Package: tuareg-mode
 Architecture: all
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..6fc0040
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: upstream
+Depends: @
+Restrictions: allow-stderr
\ No newline at end of file
diff --git a/debian/tests/upstream b/debian/tests/upstream
new file mode 100755
index 0000000..27c2919
--- /dev/null
+++ b/debian/tests/upstream
@@ -0,0 +1,22 @@
+#!/bin/sh
+# adapted from upstream's check target in Makefile
+
+set -e
+
+this=tuareg
+emacs=emacs
+
+infile=sample.ml
+outdir=${ADT_ARTIFACTS}/${this}
+mkdir -p ${outdir}
+outfile=${outdir}/sample.ml.out
+
+${emacs} --batch -q --no-site-file \
+	 --load tuareg.elc ${infile} \
+	 --eval '(setq indent-tabs-mode nil)' \
+	 --eval '(defun ask-user-about-lock (file opponent) nil)' \
+	 --eval '(indent-region (point-min) (point-max) nil)' \
+	 --eval '(indent-region (point-min) (point-max) nil)' \
+	 --eval "(write-region (point-min) (point-max) \"$outfile\")"
+
+if `diff -q ${infile} ${outfile}`; then exit 1; else exit 0; fi

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



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