[Pkg-javascript-commits] [node-stream-combiner2] 39/41: Fix testsuite
Bastien Roucariès
rouca at moszumanska.debian.org
Wed Sep 6 09:57:54 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-combiner2.
commit 7d90e5c79d2d84b044700c6e94091cc4cbd6fce0
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Sun Aug 27 23:24:30 2017 +0200
Fix testsuite
---
debian/control | 10 ++++++++--
debian/rules | 10 ++++++++--
debian/tests/control | 6 ++++++
debian/tests/require | 2 +-
debian/tests/runtestsuite | 15 +++++++++++++++
5 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/debian/control b/debian/control
index e05afa3..28613fd 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,10 @@ Build-Depends:
debhelper (>= 10)
, dh-buildinfo
, nodejs (>= 6)
+ , dpkg-dev (>= 1.17.14)
+ , tape (>=2.3.0) <!nocheck>
+ , through2 (>= 2.0.0) <!nocheck>
+ , node-duplexer2 (>= 0.1.0) <!nocheck>
Standards-Version: 4.1.0
Homepage: https://github.com/substack/stream-combiner2
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-stream-combiner2.git
@@ -18,7 +22,9 @@ Depends:
${misc:Depends}
, nodejs (>= 6)
, node-duplexer2 (>= 0.1.0)
-Description: This is a sequel to [stream-combiner](https://npmjs.org/package/stream-combiner) for streams3.
- FIX_ME long description
+Description: combine stream using stream3 Node.js API
+ This module turns a pipeline into a single stream.
+ Combine returns a stream that writes to the first stream and reads
+ from the last stream.
.
Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/rules b/debian/rules
index de57af0..55df2cc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,9 +7,15 @@
%:
dh $@
-#override_dh_auto_build:
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+ node test/*.js
+else
+ @echo '**********************************************************'
+ @echo 'Skip test suite '
+ @echo '**********************************************************'
+endif
-#override_dh_auto_test:
diff --git a/debian/tests/control b/debian/tests/control
index 8f98dd0..7ea5e73 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,8 @@
Tests: require
Depends: node-stream-combiner2
+
+Tests: runtestsuite
+Depends: node-stream-combiner2,
+ , tape (>=2.3.0)
+ , through2 (>= 2.0)
+ , node-duplexer2 (>= 0.1.0)
diff --git a/debian/tests/require b/debian/tests/require
index e09e26e..2aa6f5e 100644
--- a/debian/tests/require
+++ b/debian/tests/require
@@ -1,3 +1,3 @@
#!/bin/sh
set -e
-nodejs -e "require('stream-combiner2');"
+node -e "require('stream-combiner2');"
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..e0bad49
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='stream-combiner2'
+SEDCMD="s,(require|resolve)\s*[(]\s*'[.][.]/,\\1('$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 -E "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+cd $tmpdir
+node test/*.js
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-combiner2.git
More information about the Pkg-javascript-commits
mailing list