[Pkg-javascript-commits] [node-hmac-drbg] 10/12: Add autopkgtest
Bastien Roucariès
rouca at moszumanska.debian.org
Thu May 4 10:20:14 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-hmac-drbg.
commit 6238ae6a3e3d7084c15a878e35bec43da1fea7da
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Sat Apr 29 11:50:29 2017 +0200
Add autopkgtest
---
debian/tests/control | 3 +++
debian/tests/runtestsuite | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/debian/tests/control b/debian/tests/control
index 18d2059..a45e1f7 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
Tests: require
Depends: node-hmac-drbg
+
+Tests: runtestsuite
+Depends: node-hmac-drbg, mocha (>= 1.20)
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..f586fd5
--- /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='hmac-drbg'
+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"' 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-hmac-drbg.git
More information about the Pkg-javascript-commits
mailing list