Skip to content

Commit

Permalink
Merge branch 'master' into fix-gh-979
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Nov 21, 2019
2 parents b1f58bd + 5e728ae commit 1e6dbf9
Show file tree
Hide file tree
Showing 14 changed files with 255 additions and 59 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## **[Unreleased]**

- [#992](https://github.com/wasmerio/wasmer/pull/992) Updates WAPM version to 0.4.1, fix arguments issue introduced in #990
- [#990](https://github.com/wasmerio/wasmer/pull/990) Default wasmer CLI to `run`. Wasmer will now attempt to parse unrecognized command line options as if they were applied to the run command: `wasmer mywasm.wasm --dir=.` now works!
- [#987](https://github.com/wasmerio/wasmer/pull/987) Fix `runtime-c-api` header files when compiled by gnuc.

## 0.10.2 - 2019-11-18

- [#968](https://github.com/wasmerio/wasmer/pull/968) Added `--invoke` option to the command
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ initArch() {
case $ARCH in
amd64) ARCH="amd64";;
x86_64) ARCH="amd64";;
aarch64) ARCH="arm64";;
# i386) ARCH="386";;
*) printf "$red> The system architecture (${ARCH}) is not supported by this installation script.$reset\n"; exit 1;;
esac
Expand Down
4 changes: 4 additions & 0 deletions lib/runtime-c-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ int main()

# Testing

Tests are run using the release build of the library. If you make
changes or compile with non-default features, please ensure you
rebuild in release mode for the tests to see the changes.

The tests can be run via `cargo test`, such as:

```sh
Expand Down
2 changes: 1 addition & 1 deletion lib/runtime-c-api/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn main() {
#endif
#endif
#if defined(GCC) || defined(__clang__)
#if defined(GCC) || defined(__GNUC__) || defined(__clang__)
#if defined(__x86_64__)
#define ARCH_X86_64
#endif
Expand Down
14 changes: 10 additions & 4 deletions lib/runtime-c-api/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ add_executable(test-globals test-globals.c)
add_executable(test-import-function test-import-function.c)
add_executable(test-imports test-imports.c)
add_executable(test-import-object test-import-object.c)
add_executable(test-wasi-import-object test-wasi-import-object.c)
add_executable(test-instantiate test-instantiate.c)
add_executable(test-memory test-memory.c)
add_executable(test-module test-module.c)
Expand All @@ -19,6 +18,10 @@ add_executable(test-validate test-validate.c)
add_executable(test-context test-context.c)
add_executable(test-module-import-instantiate test-module-import-instantiate.c)

if (DEFINED WASI_TESTS)
add_executable(test-wasi-import-object test-wasi-import-object.c)
endif()

find_library(
WASMER_LIB NAMES libwasmer_runtime_c_api.dylib libwasmer_runtime_c_api.so wasmer_runtime_c_api.dll
PATHS ${CMAKE_SOURCE_DIR}/../../../target/release/
Expand Down Expand Up @@ -64,9 +67,12 @@ target_link_libraries(test-import-object general ${WASMER_LIB})
target_compile_options(test-import-object PRIVATE ${COMPILER_OPTIONS})
add_test(test-import-object test-import-object)

target_link_libraries(test-wasi-import-object general ${WASMER_LIB})
target_compile_options(test-wasi-import-object PRIVATE ${COMPILER_OPTIONS})
add_test(test-wasi-import-object test-wasi-import-object)

if (DEFINED WASI_TESTS)
target_link_libraries(test-wasi-import-object general ${WASMER_LIB})
target_compile_options(test-wasi-import-object PRIVATE ${COMPILER_OPTIONS})
add_test(test-wasi-import-object test-wasi-import-object)
endif()

target_link_libraries(test-instantiate general ${WASMER_LIB})
target_compile_options(test-instantiate PRIVATE ${COMPILER_OPTIONS})
Expand Down
9 changes: 8 additions & 1 deletion lib/runtime-c-api/tests/runtime_c_api_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ use std::process::Command;
fn test_c_api() {
let project_tests_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/tests");

run_command("cmake", project_tests_dir, vec!["."]);
let cmake_args = vec![
".",
#[cfg(feature = "wasi")]
"-DWASI_TESTS=ON",
];
// we use -f so it doesn't fail if the fiel doesn't exist
run_command("rm", project_tests_dir, vec!["-f", "CMakeCache.txt"]);
run_command("cmake", project_tests_dir, cmake_args);
run_command("make", project_tests_dir, vec!["-Wdev", "-Werror=dev"]);
run_command("make", project_tests_dir, vec!["test", "ARGS=\"-V\""]);
}
Expand Down
Binary file modified lib/runtime-c-api/tests/test-import-object
Binary file not shown.
Binary file removed lib/runtime-c-api/tests/test-wasi-import-object
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/runtime-c-api/wasmer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#endif
#endif

#if defined(GCC) || defined(__clang__)
#if defined(GCC) || defined(__GNUC__) || defined(__clang__)
#if defined(__x86_64__)
#define ARCH_X86_64
#endif
Expand Down
2 changes: 1 addition & 1 deletion lib/runtime-c-api/wasmer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#endif
#endif

#if defined(GCC) || defined(__clang__)
#if defined(GCC) || defined(__GNUC__) || defined(__clang__)
#if defined(__x86_64__)
#define ARCH_X86_64
#endif
Expand Down
4 changes: 3 additions & 1 deletion lib/spectests/tests/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# Star line allows skipping an entire wast file
# clif:skip:simd.wast:*
#
# Excludes can also contain platform
# Excludes can also contain target family
# clif:skip:data.wast:172:windows
# clif:skip:data.wast:172:unix
#
# Or target arch
# singlepass:skip:atomic.wast:*:*:aarch64

# Cranelift
clif:skip:atomic.wast:* # Threads not implemented
Expand Down
Loading

0 comments on commit 1e6dbf9

Please sign in to comment.