File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ check:
10
10
11
11
test-heroku-16 :
12
12
@echo " Running tests in docker (heroku-16)..."
13
- @docker run -v $(shell pwd) :/buildpack:ro --rm -it -e " STACK=heroku-16" heroku/heroku:16-build bash -c ' cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
13
+ @docker run -v $(shell pwd) :/buildpack:ro --rm -it -e " STACK=heroku-16" heroku/heroku:16-build bash -c ' cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run $(TESTS) ;'
14
14
@echo " "
15
15
16
16
test-heroku-18 :
17
17
@echo " Running tests in docker (heroku-18)..."
18
- @docker run -v $(shell pwd) :/buildpack:ro --rm -it -e " STACK=heroku-18" heroku/heroku:18-build bash -c ' cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
18
+ @docker run -v $(shell pwd) :/buildpack:ro --rm -it -e " STACK=heroku-18" heroku/heroku:18-build bash -c ' cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run $(TESTS) ;'
19
19
@echo " "
20
20
21
21
buildenv-heroku-16 :
Original file line number Diff line number Diff line change @@ -83,6 +83,12 @@ make test-heroku-18
83
83
make test-heroku-16
84
84
```
85
85
86
+ You can also specify which tests to run:
87
+
88
+ ```
89
+ make test TESTS="testPython3_7 testGitEgg"
90
+ ```
91
+
86
92
The tests are run via the vendored
87
93
[ shunit2] ( https://github.com/kward/shunit2 )
88
94
test framework.
Original file line number Diff line number Diff line change @@ -315,4 +315,17 @@ assertFile() {
315
315
assertEquals " $1 " " $( cat ${compile_dir} /$2 ) "
316
316
}
317
317
318
+ # If tests are passed as command-line arguments, only run those tests.
319
+ if [ $# -gt 0 ]; then
320
+ shunit_funcs_=" $* "
321
+ set --
322
+
323
+ suite () {
324
+ for shunit_func_ in ${shunit_funcs_} ; do
325
+ suite_addTest ${shunit_func_}
326
+ done
327
+ unset shunit_func_
328
+ }
329
+ fi
330
+
318
331
source $( pwd) /test/shunit2
You can’t perform that action at this time.
0 commit comments