[Pkg-javascript-commits] [node-regjsparser] 02/03: Run testsuite during build

Bastien Roucariès rouca at moszumanska.debian.org
Mon Sep 18 11:55:28 UTC 2017


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

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

commit 5019c096d376a2476dd61e6df306d55f09d653e2
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Sat Sep 16 00:44:57 2017 +0200

    Run testsuite during build
---
 debian/rules | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 25b407b..574e33d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,12 +35,14 @@ define REPLACE_MARKER_FILE_RAW
 endef
 REPLACE_MARKER_FILE:=$(subst $(newline),,$(REPLACE_MARKER_FILE_RAW))
 
+# run pipe exit if first or second fail
+PIPESAFE=exec 3>&1 && error_first=$$( ( ( $(1) ; echo $$? >&3) | $(2) ) 3>&1) && test "X$$error_first" = "X0"
 
 %:
 	dh $@
 
 override_dh_auto_configure:
-#	npm install unicode-10.0.0
+	#npm install unicode-10.0.0
 	dh_auto_configure
 
 dist:
@@ -55,6 +57,11 @@ dist/parser.js: dist/debian-identifier-regex dist
 override_dh_auto_build: dist/parser.js
 	dh_auto_build
 
+simple_test:
+	$(call PIPESAFE, sed "s/require('regjsparser')/require('.')/g" debian/tests/simple,sh)
+
+override_dh_auto_test: simple_test
+
 override_dh_auto_clean:
 	rm -rf dist
 	rm -rf node_modules

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



More information about the Pkg-javascript-commits mailing list