[Pkg-javascript-commits] [node-cached-path-relative] 08/09: Add autopkgtest

Bastien Roucariès rouca at moszumanska.debian.org
Thu Apr 20 19:23:01 UTC 2017


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

rouca pushed a commit to branch master
in repository node-cached-path-relative.

commit a9e2d570f81d00b5e127dc20bb2dc867c443647f
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Mon Apr 17 14:56:52 2017 +0200

    Add autopkgtest
---
 debian/changelog          |  2 +-
 debian/control            |  9 ++++++++-
 debian/rules              |  5 -----
 debian/tests/control      |  4 ++++
 debian/tests/runtestsuite | 14 ++++++++++++++
 5 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7d4a46a..eade039 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-node-cached-path-relative (1.0.1~1-1) UNRELEASED; urgency=low
+node-cached-path-relative (1.0.1-1) UNRELEASED; urgency=low
 
   [ Bastien Roucariès <rouca at debian.org>  Mon, 17 Apr 2017 14:20:31 +0200 ]
   * Initial release (Closes: #nnnn)
diff --git a/debian/control b/debian/control
index 2120ab5..58ff895 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,8 @@ Build-Depends:
  debhelper (>= 10)
  , dh-buildinfo
  , nodejs (>= 4.7)
+ , dpkg-dev (>= 1.17.14)
+ , node-tape (>= 4.2.0) <!nocheck>
 Standards-Version: 3.9.8
 Homepage: https://github.com/ashaffer/cached-path-relative#readme
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-cached-path-relative.git
@@ -18,6 +20,11 @@ Depends:
  ${misc:Depends}
  , nodejs (>= 4.7)
 Description: Memoize the results of the path.relative function
- FIX_ME long description
+ path.relative function can be an expensive operation
+ if it happens a lot, and its results have a low probability to
+ change for the same arguments.
+ .
+ This module thus cache (memoize) the result of path.relative,
+ in order to speed of browserify.
  .
  Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/rules b/debian/rules
index 39e1749..6077087 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,8 +13,3 @@ override_dh_auto_build:
 
 override_dh_auto_test:
 	tape test/*.js
-
-override_dh_installchangelogs:
-	dh_installchangelogs -k History.md
-
-
diff --git a/debian/tests/control b/debian/tests/control
index 0c54d52..ded2fdc 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,6 @@
 Tests: require
 Depends: node-cached-path-relative
+
+Tests: runtestsuite
+Depends: node-cached-path-relative, node-tape (>= 4.2.0)
+
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..c0fe862
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='cached-path-relative'
+SEDCMD="s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('$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 "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+tape $tmpdir/test

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



More information about the Pkg-javascript-commits mailing list