[Pkg-javascript-commits] [node-stream-http] 204/208: Run testsuite

Bastien Roucariès rouca at moszumanska.debian.org
Sun Aug 13 13:39:45 UTC 2017


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

rouca pushed a commit to branch master
in repository node-stream-http.

commit 971616022a6486b7bc49891cab8af9621d572965
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Mon Jun 12 22:34:52 2017 +0200

    Run testsuite
---
 debian/tests/control      |  3 +++
 debian/tests/runtestsuite | 19 +++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
index fedcf0e..7718dbd 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: require
 Depends: node-stream-http
+
+Tests: runtestsuite
+Depends: node-stream-http, node-tape (>= 4.2)
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..58da5b9
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='stream-http'
+SEDCMD1="s,require\s*[(]\s*'[.][.]/[.][.]/,require('$PACKAGE,g"
+SEDCMD2="s,require[.]resolve\s*[(]\s*'[.][.]/[.][.],require.resolve('$PACKAGE,g"
+
+
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir/test
+find test/ -maxdepth 2 -type f -name '*.js' -print0 | \
+    xargs -0 -n1  \
+	  sh -c 'set -e; echo "TESTING: $3"; sed -e "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD1;$SEDCMD2" "$tmpdir"
+
+
+tape $tmpdir/test/node/*.js

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



More information about the Pkg-javascript-commits mailing list