diff --git a/Makefile b/Makefile index 6c77a860680..6b6728d312f 100644 --- a/Makefile +++ b/Makefile @@ -539,27 +539,37 @@ build-capi-headless-ios: # test compilers test-stage-0-wast: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked # test packages test-stage-1-test-all: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --all --release $(exclude_tests) --exclude wasmer-c-api-test-runner --exclude wasmer-capi-examples-runner $(compiler_features) --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --all --release $(exclude_tests) --exclude wasmer-c-api-test-runner --exclude wasmer-capi-examples-runner $(compiler_features) --locked test-stage-2-test-compiler-cranelift-nostd: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --manifest-path lib/compiler-cranelift/Cargo.toml --release --no-default-features --features=std --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --manifest-path lib/compiler-cranelift/Cargo.toml --release --no-default-features --features=std --locked test-stage-3-test-compiler-singlepass-nostd: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --manifest-path lib/compiler-singlepass/Cargo.toml --release --no-default-features --features=std --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --manifest-path lib/compiler-singlepass/Cargo.toml --release --no-default-features --features=std --locked test-stage-4-wasmer-cli: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --manifest-path lib/virtual-fs/Cargo.toml --release --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --manifest-path lib/virtual-fs/Cargo.toml --release --locked $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --manifest-path lib/cli/Cargo.toml $(compiler_features) --release --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --manifest-path lib/cli/Cargo.toml $(compiler_features) --release --locked # test examples test-stage-5-test-examples: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) $(compiler_features) --features wasi --examples --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) $(compiler_features) --features wasi --examples --locked test-stage-6-test-examples-release: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release $(compiler_features) --features wasi --examples --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release $(compiler_features) --features wasi --examples --locked test-stage-7-capi-integration-tests: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release --package wasmer-c-api-test-runner --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release --package wasmer-c-api-test-runner --locked $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release --package wasmer-capi-examples-runner --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release --package wasmer-capi-examples-runner --locked test: test-compilers test-packages test-examples @@ -592,12 +602,15 @@ test-compilers-compat: $(foreach compiler,$(compilers),test-$(compiler)) test-singlepass-universal: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- singlepass::universal + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- singlepass::universal test-cranelift-universal: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- cranelift::universal + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- cranelift::universal test-llvm-universal: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- llvm::universal + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- llvm::universal test-singlepass: $(foreach singlepass_engine,$(filter singlepass-%,$(compilers_engines)),test-$(singlepass_engine)) @@ -617,6 +630,8 @@ test-capi-jsc: build-capi-jsc package-capi test-capi-integration-jsc test-capi-crate-%: require-nextest WASMER_CAPI_CONFIG=$(shell echo $@ | sed -e s/test-capi-crate-//) $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --manifest-path lib/c-api/Cargo.toml --release \ --no-default-features --features wat,compiler,wasi,middlewares,webc_runner $(capi_compiler_features) --locked + WASMER_CAPI_CONFIG=$(shell echo $@ | sed -e s/test-capi-crate-//) $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --manifest-path lib/c-api/Cargo.toml --release \ + --no-default-features --features wat,compiler,wasi,middlewares,webc_runner $(capi_compiler_features) --locked test-capi-integration-%: # note: you need to do make build-capi and make package-capi first! @@ -627,22 +642,27 @@ test-capi-integration-%: test-wasi-unit: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --manifest-path lib/wasi/Cargo.toml --release --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --manifest-path lib/wasi/Cargo.toml --release --locked test-wasi: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- wasi::wasitests + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) --locked -- wasi::wasitests test-integration-cli: build-wasmer build-capi package-capi-headless package distribution require-nextest cp ./dist/wasmer.tar.gz ./link.tar.gz rustup target add wasm32-wasi WASMER_DIR=`pwd`/package $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --features webc_runner --no-fail-fast -p wasmer-integration-tests-cli --locked + WASMER_DIR=`pwd`/package test --doc run $(CARGO_TARGET_FLAG) --features webc_runner --no-fail-fast -p wasmer-integration-tests-cli --locked # Before running this in the CI, we need to set up link.tar.gz and /cache/wasmer-[target].tar.gz test-integration-cli-ci: require-nextest rustup target add wasm32-wasi $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --features webc_runner -p wasmer-integration-tests-cli --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --features webc_runner -p wasmer-integration-tests-cli --locked test-integration-ios: require-nextest $(CARGO_BINARY) nextest run $(CARGO_TARGET_FLAG) --features webc_runner -p wasmer-integration-tests-ios --locked + $(CARGO_BINARY) test --doc $(CARGO_TARGET_FLAG) --features webc_runner -p wasmer-integration-tests-ios --locked generate-wasi-tests: # Uncomment the following for installing the toolchain