[Pkg-javascript-commits] [node-minimalistic-crypto-utils] 07/08: Run testsuite
Bastien Roucariès
rouca at moszumanska.debian.org
Thu May 4 10:24:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-minimalistic-crypto-utils.
commit 775f3e30f82eec91b426a134996de3c7a247c8bf
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Thu Apr 27 17:26:06 2017 +0200
Run testsuite
---
debian/control | 12 +++++++++---
debian/rules | 9 ++++++++-
debian/tests/control | 4 ++++
debian/tests/runtestsuite | 13 +++++++++++++
4 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/debian/control b/debian/control
index cdababa..57020bf 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,9 @@ Uploaders: Bastien Roucariès <rouca at debian.org>
Build-Depends:
debhelper (>= 10)
, dh-buildinfo
- , nodejs
+ , nodejs (>= 4.7)
+ , dpkg-dev (>= 1.17.14)
+ , mocha (>= 1.20) <!nocheck>
Standards-Version: 3.9.8
Homepage: https://github.com/indutny/minimalistic-crypto-utils#readme
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-minimalistic-crypto-utils.git
@@ -16,8 +18,12 @@ Package: node-minimalistic-crypto-utils
Architecture: all
Depends:
${misc:Depends}
- , nodejs
+ , nodejs (>= 4.7)
Description: Minimalistic tools for JS crypto modules
- FIX_ME long description
+ This package includes tools and functions useful for implementing
+ cryptographic operation in pure javascript.
+ .
+ This a dependency of browserify, a tool that create self contained module
+ that run in browser context.
.
Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/rules b/debian/rules
index de57af0..5afcfd5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,14 @@
#override_dh_auto_build:
-#override_dh_auto_test:
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ mocha -R spec test/
+else
+ @echo '**********************************************************'
+ @echo 'Skip test suite '
+ @echo '**********************************************************'
+endif
diff --git a/debian/tests/control b/debian/tests/control
index ee0c66c..766dd80 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,6 @@
Tests: require
Depends: node-minimalistic-crypto-utils
+
+Tests: require
+Depends: node-minimalistic-crypto-utils, mocha
+
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..9be555e
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='minimalistic-crypto-utils'
+SEDCMD="s,require\s*[(]\s*'[.][.]/,require('$PACKAGE,g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir/
+find $tmpdir -name '*.js' -print0 |
+ xargs -n1 sh -c 'set -e; echo "TESTING: $3"; sed "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+mocha -R $tmpdir/test/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-minimalistic-crypto-utils.git
More information about the Pkg-javascript-commits
mailing list