[Pkg-javascript-commits] [node-browserify-aes] 04/04: Improve testing

Bastien Roucariès rouca at moszumanska.debian.org
Tue Feb 20 12:28:16 UTC 2018


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

rouca pushed a commit to tag debian-1.1.1-2
in repository node-browserify-aes.

commit f91fadea7b17d2d95b32a081c0135800cf2b8c6e
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Sun Feb 18 23:57:49 2018 +0100

    Improve testing
---
 debian/control            |  1 +
 debian/rules              |  2 +-
 debian/tests/control      |  2 +-
 debian/tests/require      |  0
 debian/tests/runtestsuite | 12 +++++++++++-
 5 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 0d05191..7ffcf40 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Build-Depends:
  , node-buffer-xor (>= 1.0.3) <!nocheck>
  , node-safe-buffer (>= 5.0.1) <!nocheck>
  , node-tape (>=4.6) <!nocheck>
+ , node-tap (>=10) <!nocheck>
 Standards-Version: 4.1.3
 Homepage: https://github.com/crypto-browserify/browserify-aes
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-browserify-aes.git
diff --git a/debian/rules b/debian/rules
index d0065d3..69f151a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@
 #override_dh_auto_build:
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
-	nodejs test/index.js
+	tap -R spec test/index.js
 else
 	@echo '**********************************************************'
 	@echo 'Skip test suite                                           '
diff --git a/debian/tests/control b/debian/tests/control
index cc3bb22..bbea97e 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -2,4 +2,4 @@ Tests: require
 Depends: node-browserify-aes, nodejs (>= 6)
 
 Tests: runtestsuite
-Depends: node-browserify-aes, node-tape (>= 4.6)
+Depends: node-browserify-aes, node-tape (>= 4.6), node-tap (>=10)
diff --git a/debian/tests/require b/debian/tests/require
old mode 100644
new mode 100755
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
index 8df06ef..080f216 100755
--- a/debian/tests/runtestsuite
+++ b/debian/tests/runtestsuite
@@ -12,4 +12,14 @@ find test/ -name '*.js' -print0 |
     xargs -0 -n1  \
 	  sh -c 'set -e; echo "TESTING: $3"; sed -e "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
 cd "$tmpdir"
-tape test/*.js
+
+sed_move_to_stderr() {
+    sed  -e "/$1/w /dev/stderr" -e "/$1/d"
+}
+
+exec 5>&1
+exec 3>&1
+error_tap=$( ( ( (tap -R spec test/*.js) 2>&1 >&3 3>&- ; echo $? >&4)  | sed_move_to_stderr 'Cipheriv for counter' 2>&1 >&3 3>&- ) 4>&1 >&5)
+exec 3>&-
+exec 5>&-
+test "X$error_tap" = "X0"

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



More information about the Pkg-javascript-commits mailing list