Skip to content

Commit

Permalink
Debian build friendly build dependency handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vlajos committed Oct 2, 2019
1 parent d605025 commit 0a0aeb1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,27 @@ rules/%.sed: dict/%.dict
lint_dicts:
./util/lint-dicts.sh

KCOV=/usr/local/bin/kcov --include-pattern=misspell-fixer/misspell-fixer,misspell-fixer/lib --path-strip-level=1
ifeq ($(wildcard /usr/local/bin/kcov),)
KCOV_BIN = kcov
else
KCOV_BIN = /usr/local/bin/kcov
endif

ifeq ($(wildcard shunit2-2.1.7),)
SHUNIT_PREFIX = ""
else
SHUNIT_PREFIX = shunit2-2.1.7/
endif

KCOV=${KCOV_BIN} --include-pattern=misspell-fixer/misspell-fixer,misspell-fixer/lib --path-strip-level=1
COV_DIR=/tmp/coverage
KCOV_WITH_ENV=env -i COVERAGE_WRAPPER="${KCOV} ${COV_DIR}-forks $(CURDIR)/test/coverage_wrapper.sh" ${KCOV}
KCOV_WITH_ENV=env -i COVERAGE_WRAPPER="${KCOV} ${COV_DIR}-forks $(CURDIR)/test/coverage_wrapper.sh" SHUNIT_PREFIX=${SHUNIT_PREFIX} ${KCOV}
test:
${KCOV_WITH_ENV} ${COV_DIR}-main test/tests.sh &&\
${KCOV_WITH_ENV} --coveralls-id=${TRAVIS_JOB_ID} --merge ${COV_DIR} ${COV_DIR}-main ${COV_DIR}-forks

test_self:
test/self-spelling-test.sh
env -i SHUNIT_PREFIX=${SHUNIT_PREFIX}test/self-spelling-test.sh

prepare_environment:
sudo apt-get update -qq
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: misspell-fixer
Section: devel
Priority: optional
Maintainer: Lajos Veres <[email protected]>
Build-Depends: debhelper (>= 12), ruby-ronn
Build-Depends: debhelper (>= 12), ruby-ronn, kcov (>= 36+dfsg-1+b2), shunit2 (>= 2.1.6-1.1)
Standards-Version: 4.4.0
Homepage: https://github.com/vlajos/misspell-fixer
Vcs-Browser: https://github.com/vlajos/misspell-fixer
Expand Down
2 changes: 1 addition & 1 deletion test/self-spelling-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ suite(){


# load shunit2
. shunit2-2.1.7/shunit2
. ${SHUNIT_PREFIX}shunit2
2 changes: 1 addition & 1 deletion test/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,4 @@ suite(){


# load shunit2
. shunit2-2.1.7/shunit2 >&2
. ${SHUNIT_PREFIX}shunit2 >&2

0 comments on commit 0a0aeb1

Please sign in to comment.