Add Makefile for tests
This commit is contained in:
parent
1c3205aa66
commit
0a25608ff0
2 changed files with 24 additions and 1 deletions
5
Makefile
5
Makefile
|
@ -65,7 +65,10 @@ bin-test: $(BIN_TARGET_TESTS)
|
|||
lib: $(LIB_TARGETS)
|
||||
@$(ECHO) "\t[ALLLIB ]"
|
||||
|
||||
lib-test: $(LIB_TARGETS_TEST)
|
||||
lib-test: $(LIB_TARGETS_TEST) lib-imag-ruby-test
|
||||
|
||||
lib-imag-ruby-test:
|
||||
@$(MAKE) -C imag-ruby
|
||||
|
||||
test: bin-test lib-test
|
||||
|
||||
|
|
20
imag-ruby/Makefile
Normal file
20
imag-ruby/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
ECHO=$(shell which echo) -e
|
||||
RUBY=$(shell which ruby)
|
||||
RUBY_TESTS=$(shell find ./test -maxdepth 1 -name "*.rb" -type f)
|
||||
RUBY_TEST_TARGETS=$(foreach x,$(subst ,,$(RUBY_TESTS)),$(x))
|
||||
|
||||
all: lib
|
||||
|
||||
lib:
|
||||
$(MAKE) -C .. imag-ruby
|
||||
|
||||
lib-release:
|
||||
$(MAKE) -C .. imag-ruby-release
|
||||
|
||||
test: lib $(RUBY_TEST_TARGETS)
|
||||
|
||||
$(RUBY_TEST_TARGETS): %: lib .FORCE
|
||||
@$(ECHO) "\t[TEST ]:\t$@"
|
||||
@$(RUBY) $(subst -test,,$@)
|
||||
|
||||
.FORCE:
|
Loading…
Reference in a new issue