[Pkg-javascript-commits] [node-cipher-base] 18/18: Fix runtestsuite

Bastien Roucariès rouca at moszumanska.debian.org
Thu Apr 20 19:25:26 UTC 2017


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

rouca pushed a commit to branch master
in repository node-cipher-base.

commit 17d177a0e4bc4273417920ec56fa3483b18cc9d0
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Tue Apr 18 23:20:42 2017 +0200

    Fix runtestsuite
---
 debian/tests/control      |  3 +++
 debian/tests/runtestsuite | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
index c747412..7247dc6 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: require
 Depends: node-cipher-base
+
+Tests: runtestsuite
+Depends: node-cipher-base, node-tape (>= 4.6)
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..e4cf2fa
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='cipher-base'
+SEDCMD="s,require\s*[(]\s*'[.][^']*'\s*[)],require('$PACKAGE'),g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp  test.js $tmpdir/test.js
+echo 'test.js' |
+    xargs -n1  sh -c 'set -e; echo "TESTING: $3"; sed "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+tape $tmpdir/test.js

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



More information about the Pkg-javascript-commits mailing list