8000 configurable-make-test: Allows `make test` to be run with `SHUNIT_BIN`. · devandroid/chruby@84ca7e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 84ca7e5

Browse files
wilmoorepostmodern
authored andcommitted
configurable-make-test: Allows make test to be run with SHUNIT_BIN.
- Contributors may have installed shunit2(1) to somewhere other than `/usr/share/shunit2/shunit2`. - Allow `SHUNIT2_BIN=$(which shunit2) make test`. - Default to `/usr/share/shunit2/shunit2` if `SHUNIT2_BIN` is not given.
1 parent d9f4e1b commit 84ca7e5

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ SIG=$(PKG_DIR)/$(PKG_NAME).asc
1313

1414
PREFIX?=/usr/local
1515
DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)
16+
SHUNIT_BIN?=/usr/share/shunit2/shunit2
1617

1718
pkg:
1819
mkdir -p $(PKG_DIR)
@@ -33,8 +34,8 @@ clean:
3334
all: $(PKG) $(SIG)
3435

3536
test:
36-
SHELL=`which bash` ./test/runner
37-
SHELL=`which zsh` ./test/runner
37+
SHELL=`which bash` SHUNIT_BIN=$(SHUNIT_BIN) ./test/runner
38+
SHELL=`which zsh` SHUNIT_BIN=$(SHUNIT_BIN) ./test/runner
3839

3940
tag:
4041
git push

test/chruby_reset_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ test_chruby_reset_duplicate_path()
3838
assertEquals "PATH was not sanitized" "$TEST_PATH" "$PATH"
3939
}
4040

41-
SHUNIT_PARENT=$0 . /usr/share/shunit2/shunit2
41+
SHUNIT_PARENT=$0 . $SHUNIT_BIN

test/chruby_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ test_chruby_unknown()
2929
assertEquals "did not return 1" $? 1
3030
}
3131

32-
SHUNIT_PARENT=$0 . /usr/share/shunit2/shunit2
32+
SHUNIT_PARENT=$0 . $SHUNIT_BIN

test/chruby_use_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ tearDown() {
2323
chruby_reset
2424
}
2525

26-
SHUNIT_PARENT=$0 . /usr/share/shunit2/shunit2
26+
SHUNIT_PARENT=$0 . $SHUNIT_BIN

0 commit comments

Comments
 (0)
0