-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
112 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
|
||
* | ||
*.o | ||
|
||
|
||
# Unignore files ending with `.c` (i.e. `wasm-c-api-wasi.c`) | ||
!*.c | ||
# Unignore Makefile | ||
!Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
$(info Using provided WASMER_DIR=$(WASMER_DIR)) | ||
|
||
ifeq (,$(wildcard $(WASMER_DIR)/bin/wasmer)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# ignore wasm-c-api binaries | ||
wasm-c-api-* | ||
test-* | ||
|
||
# Unignore files ending with `.c` (i.e. `wasm-c-api-wasi.c`) | ||
!*.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
$(info Using provided WASMER_DIR=$(WASMER_DIR)) | ||
|
||
ifeq (,$(wildcard $(WASMER_DIR)/bin/wasmer)) | ||
CFLAGS = -g -I$(WASMER_DIR)/include | ||
LDFLAGS = -Wl,-rpath,$(WASMER_DIR)/lib | ||
LDLIBS = -L$(WASMER_DIR)/lib -lwasmer | ||
else | ||
CFLAGS = -g -I$(shell $(WASMER_DIR)/bin/wasmer config --includedir) | ||
LDFLAGS = -Wl,-rpath,$(shell $(WASMER_DIR)/bin/wasmer config --libdir) | ||
LDLIBS = $(shell $(WASMER_DIR)/bin/wasmer config --libs) | ||
endif | ||
|
||
$(info * CFLAGS: $(CFLAGS)) | ||
$(info * LDFLAGS: $(LDFLAGS)) | ||
$(info * LDLIBS: $(LDLIBS)) | ||
|
||
CAPI_WASMER_TESTS = \ | ||
test-early-exit test-memory test-wasi \ | ||
test-wat2wasm | ||
|
||
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 | ||
|
||
CAPI_BASE_TESTS_NOT_WORKING = \ | ||
wasm-c-api/example/finalize wasm-c-api/example/hostref wasm-c-api/example/multi \ | ||
wasm-c-api/example/table wasm-c-api/example/threads | ||
|
||
DEPRECATED_TESTS = \ | ||
deprecated/test-context deprecated/test-import-object deprecated/test-module-imports \ | ||
deprecated/test-import-trap deprecated/test-module-serialize \ | ||
deprecated/test-exported-memory deprecated/test-imports deprecated/test-module \ | ||
deprecated/test-exports deprecated/test-instantiate deprecated/test-tables \ | ||
deprecated/test-globals deprecated/test-memory deprecated/test-validate \ | ||
deprecated/test-module-exports deprecated/test-module-import-instantiate | ||
|
||
DEPRECATED_NOT_WORKING = test-import-function test-import-function-callinfo test-wasi-import-object test-emscripten-import-object | ||
|
||
ALL = $(CAPI_BASE_TESTS) $(CAPI_WASMER_TESTS) $(DEPRECATED_TESTS) | ||
|
||
test-%: %.o | ||
deprecated/test-%: deprecated/%.o | ||
|
||
.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) | ||
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: test-capi-base test-capi-wasmer | ||
|
||
.PHONY: test-deprecated | ||
.SILENT: test-deprecated | ||
test-deprecated: $(DEPRECATED_TESTS) | ||
set -o errexit; \ | ||
$(foreach example,$?,echo Running \"$(example)\" example; cd $(shell dirname $(realpath $(example))) && ./$(shell basename $(example)); echo;) | ||
|
||
test: test-capi test-deprecated | ||
|
||
.SILENT: clean | ||
.PHONY: clean | ||
clean: | ||
$(foreach file,$(ALL),rm -f $(file).o $(file)) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.