[Pkg-javascript-commits] [node-stack-utils] 65/67: Add autopkgtest
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Sep 7 09:53:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stack-utils.
commit c6b28552f32d4c680bce727048723878c13a47b3
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Mon Aug 21 17:14:43 2017 +0200
Add autopkgtest
---
debian/control | 3 ++-
debian/rules | 1 +
debian/tests/control | 7 +++++++
debian/tests/runtestsuite | 15 +++++++++++++++
4 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index b04dc30..9120aab 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,8 @@ Source: node-stack-utils
Section: web
Priority: optional
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
-Uploaders: Abhishek Lolage <abhisheklolage at gmail.com>
+Uploaders: Abhishek Lolage <abhisheklolage at gmail.com>,
+ Bastien Roucariès <rouca at debian.org>
Build-Depends:
debhelper (>= 10)
, dh-buildinfo
diff --git a/debian/rules b/debian/rules
index 5e5c3b4..2b6d18b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,7 @@
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
cp -r test testbuild
+ # lack of depends for it
find testbuild -maxdepth 1 \( -name '*.js' -a -not -name 'long-stack-traces.js' \) -exec tap {} \;
else
@echo '**********************************************************'
diff --git a/debian/tests/control b/debian/tests/control
index 780dc59..05e966e 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,9 @@
Tests: require
Depends: node-stack-utils
+
+Tests: require
+Depends: node-stack-utils,
+ , node-q (>= 1.4.1)
+ , node-tap (>= 8.0.0)
+ , node-pify (>= 2.3.0)
+ , node-lodash-packages (>= 4.15.0)
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..f340338
--- /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='stack-utils'
+SEDCMD="-e s,require\s*[(]\s*'[.][.]/?([^']*)'\s*[)],require('$PACKAGE/\1'),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 "Create: $3"; sed -E $1 < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+
+find $tmpdir/test/ -maxdepth 1 \( -name '*.js' -a -not -name 'long-stack-traces.js' \) -exec tap {} \;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stack-utils.git
More information about the Pkg-javascript-commits
mailing list