Skip to content

Commit

Permalink
Merge pull request #2408 from Hywan/test-capi
Browse files Browse the repository at this point in the history
test(c-api) Clean up the `tests/Makefile`
  • Loading branch information
Hywan authored Jul 19, 2021
2 parents 2e48aa5 + e1a675c commit 28079d8
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions lib/c-api/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,19 @@ $(info * LDFLAGS: $(LDFLAGS))
$(info * LDLIBS: $(LDLIBS))

CAPI_BASE_TESTS = \
wasm-c-api/example/callback wasm-c-api/example/global wasm-c-api/example/hello \
wasm-c-api/example/memory wasm-c-api/example/reflect wasm-c-api/example/serialize \
wasm-c-api/example/start wasm-c-api/example/trap wasm-c-api/example/multi
wasm-c-api/example/callback wasm-c-api/example/global wasm-c-api/example/hello \
wasm-c-api/example/memory wasm-c-api/example/reflect wasm-c-api/example/serialize \
wasm-c-api/example/start wasm-c-api/example/trap wasm-c-api/example/multi

CAPI_BASE_TESTS_NOT_WORKING = \
wasm-c-api/example/finalize wasm-c-api/example/hostref wasm-c-api/example/threads \
wasm-c-api/example/finalize wasm-c-api/example/hostref wasm-c-api/example/threads \
wasm-c-api/example/table

ALL = $(CAPI_BASE_TESTS) $(CAPI_WASMER_TESTS)

test-%: %.o
ALL = $(CAPI_BASE_TESTS)

.PHONY: all
all: $(ALL)

.PHONY: test-capi-wasmer
.SILENT: test-capi-wasmer
test-capi-wasmer: $(CAPI_WASMER_TESTS)
set -o errexit; \
$(foreach example,$?,echo Running \"$(example)\" example; cd $(shell dirname $(realpath $(example))) && ./$(shell basename $(example)); echo;)

.PHONY: test-capi-base
.SILENT: test-capi-base
test-capi-base: $(CAPI_BASE_TESTS)
Expand All @@ -48,7 +40,7 @@ test-capi-base: $(CAPI_BASE_TESTS)

.PHONY: test-capi-base
.SILENT: test-capi-base
test-capi: test-capi-base test-capi-wasmer
test-capi: test-capi-base

test: test-capi

Expand Down

0 comments on commit 28079d8

Please sign in to comment.