[Pkg-javascript-commits] [acorn] 01/01: Run basic testsuite
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 18 12:17:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository acorn.
commit edb2ce1c1e79fe55579aed9e8f467e813ae6a377
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Fri Aug 18 14:17:29 2017 +0200
Run basic testsuite
---
debian/control | 3 ++-
debian/rules | 39 +++++++++++++++++++++++++++++++++++----
2 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/debian/control b/debian/control
index d7f75b6..0095b69 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,8 @@ Uploaders: Julien Puydt <julien.puydt at laposte.net>
Section: web
Priority: extra
Build-Depends: debhelper (>= 10),
- docbook2x,
+ dpkg-dev (>= 1.17.14),
+ docbook2x <!nodoc>,
node-ast-types,
node-es6-module-transpiler,
node-graceful-fs,
diff --git a/debian/rules b/debian/rules
index 3aa0d8f..1e8a845 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,7 @@
include /usr/share/dpkg/pkg-info.mk
-MANPAGES := $(subst .xml,, $(wildcard debian/man/*.*.xml))
+MANPAGES_TARGET := $(subst .1.xml,.1, $(wildcard debian/man/*.*.xml))
SOURCES = $(shell find src/ -name "*.js")
TARGETS = $(subst src, dist, $(SOURCES))
@@ -27,6 +27,28 @@ override_dh_auto_build: dist $(TARGETS) $(MANPAGES)
ln -s index.js dist/acorn.js
ln -s loose dist/acorn_loose
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+override_dh_auto_test:
+ @echo '**********************************************************'
+ @echo 'Run test suite '
+ @echo '**********************************************************'
+ # basic smoke test
+ @echo Run bin acorn on itself
+ @echo '=========================================================='
+ dist/bin/acorn < dist/index.js
+ @echo '=========================================================='
+ # TODO
+ # run package testsuite
+ # @echo '=========================================================='
+ # nodejs test/run.js
+ # @echo '=========================================================='
+ @echo '**********************************************************'
+else
+override_dh_auto_test:
+ @echo '**********************************************************'
+ @echo 'Skip test suite '
+ @echo '**********************************************************'
+endif
.PHONY: dist
dist:
@@ -40,7 +62,16 @@ dist/bin/acorn.js: dist/index.js
%.js:
$(COMPILE_MODULES) -I$(dir $(subst dist, src, $@)) $(subst dist, src, $@) > $@
-$(MANPAGES):
+%.1: %.1.xml
# Create man page from DocBook XML
- docbook2x-man --string-param header-3="$(SOURCE_DATE_EPOCH)" $@.xml
- mv -v $(shell basename $@) $@
+ cd $(dir $@) && docbook2x-man --encoding=utf-8 --string-param header-3="$(SOURCE_DATE_EPOCH)" $(notdir $@).xml
+
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+override_dh_installman: $(MANPAGES_TARGET)
+ dh_installman
+else
+override_dh_installman:
+ @echo '**********************************************************'
+ @echo 'Skip man page create '
+ @echo '**********************************************************'
+endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/acorn.git
More information about the Pkg-javascript-commits
mailing list