[Pkg-javascript-commits] [node-miller-rabin] 35/37: Run autopkgtest

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:20:44 UTC 2017


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

rouca pushed a commit to branch master
in repository node-miller-rabin.

commit 2560a97de3938b7c37be2528a42bfb23376da3f4
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Mon Apr 17 14:10:14 2017 +0200

    Run autopkgtest
---
 debian/dirs               |  1 -
 debian/tests/control      |  3 +++
 debian/tests/runtestsuite | 14 ++++++++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index e772481..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin
diff --git a/debian/tests/control b/debian/tests/control
index 22823ba..9e53c00 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: require
 Depends: node-miller-rabin
+
+Tests: runtestsuite
+Depends: node-miller-rabin, mocha (>= 1.2)
\ No newline at end of file
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..8a9770b
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='miller-rabin'
+SEDCMD="s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('$PACKAGE'),g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir/test
+find test/ -maxdepth 1 -name '*.js' -print0 | \
+    xargs -0 -n1  \
+	  sh -c 'set -e; echo "TESTING: $3"; sed $1 < $3 > $2/$3; tape "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+mocha -R spec $tmpdir/test

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-miller-rabin.git



More information about the Pkg-javascript-commits mailing list