[Pkg-javascript-commits] [node-resumer] 01/01: Run testsuite

Bastien Roucariès rouca at moszumanska.debian.org
Sun Apr 9 15:50:07 UTC 2017


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

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

commit 12524ca60dce74240ffc0f164fa557457279d019
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Sun Apr 9 15:41:02 2017 +0200

    Run testsuite
---
 debian/README.Debian          |  3 ---
 debian/changelog              |  8 ++++++++
 debian/compat                 |  2 +-
 debian/control                |  9 ++++++---
 debian/patches/through2.patch | 16 ----------------
 debian/rules                  | 13 ++++++++++---
 debian/tests/control          |  3 +++
 debian/tests/runtestsuite     | 13 +++++++++++++
 debian/watch                  |  2 +-
 9 files changed, 42 insertions(+), 27 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 7f236d7..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,3 +0,0 @@
-The upstream testsuite is currently disabled. It requires node-tape
-which is not yet packaged in Debian. In fact, node-resumer is being
-packaged because it is a dependency of node-tape. 
diff --git a/debian/changelog b/debian/changelog
index 90631a9..7c84141 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+node-resumer (0.0.0-3) unstable; urgency=medium
+
+  * Team upload.
+  * Bump to compat 10.
+  * Run testsuite.
+
+ -- Bastien Roucariès <rouca at debian.org>  Sun, 09 Apr 2017 15:40:54 +0200
+
 node-resumer (0.0.0-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index ebf15c5..4b8cbf5 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,12 @@ Section: web
 Priority: optional
 Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
 Uploaders: Ross Gammon <rosco2 at ubuntu.com>
-Build-Depends: debhelper (>= 9),
-               dh-buildinfo,
-               nodejs (>= 4.7)
+Build-Depends: debhelper (>= 10)
+               , dh-buildinfo,
+	       , dpkg-dev (>= 1.17.14)
+               , nodejs (>= 4.7)
+	       , node-tape (>= 4.0) <!nocheck>
+	       , node-concat-stream (>= 0.1.1) <!nocheck>
 Standards-Version: 3.9.8
 Homepage: https://github.com/substack/resumer
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-resumer.git
diff --git a/debian/patches/through2.patch b/debian/patches/through2.patch
deleted file mode 100644
index 52a8050..0000000
--- a/debian/patches/through2.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Use through2 instead of through
- Through2 is better maintained.
- As recommended by https://wiki.debian.org/Javascript/Nodejs/Database
-Author: Ross Gammon <rossgammon at mail.dk>
-Forwarded: not-needed
-Last-Update: 2016-11-18
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- node-resumer.orig/index.js
-+++ node-resumer/index.js
-@@ -1,4 +1,4 @@
--var through = require('through');
-+var through = require('through2');
- var nextTick = typeof setImmediate !== 'undefined'
-     ? setImmediate
-     : process.nextTick
diff --git a/debian/rules b/debian/rules
index 4363aab..e62a68d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,13 @@
 %:
 	dh $@
 
-# Upstream testsuite also requires tape which is not packaged yet
-#override_dh_auto_test:
-#	tap test/*.js
+# Upstream testsuite requires tape that require resumer.
+# Avoid loop with buildprofile
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+	tape test/*.js
+else
+	@echo '**********************************************************'
+	@echo 'Skip test suite                                           '
+	@echo '**********************************************************'
+endif
diff --git a/debian/tests/control b/debian/tests/control
index 2345cc8..3b0367a 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: require
 Depends: node-resumer
+
+Tests: runtestsuite
+Depends: node-resumer, node-tape (>= 4.0), node-concat-stream
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..2bd8f9d
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+PACKAGE='resumer'
+SEDCMD="s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('$PACKAGE'),g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+mkdir $tmpdir/test
+find test/ -name '*.js' -print0 | \
+    xargs -0 -n1  \
+	  sh -c 'set -e; echo "TESTING: $3"; sed $1 < $3 > $2/$3; tape "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+
diff --git a/debian/watch b/debian/watch
index 8bd3c1f..b08d51b 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
-version=3
+version=4
 opts=\
 dversionmangle=s/\+(debian|dfsg|ds|deb)(\.\d+)?$//,\
 filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/node-resumer-$1.tar.gz/ \

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



More information about the Pkg-javascript-commits mailing list