From 158611f3e5c891cbaac041129700e81c829e1d71 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Wed, 17 Feb 2021 17:24:54 +0200 Subject: [PATCH] Fix tests --- .github/workflows/tests.yml | 3 ++- platforms/android/app/src/main/cpp/main.c | 8 +++++--- platforms/cpp/wasm3_cpp/include/wasm3_cpp.h | 4 ++-- platforms/ios/wasm3/main.c | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 997188a..f3e415a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -540,8 +540,9 @@ jobs: build-python: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 ] + python-version: [ "3.5", "3.6", "3.7", "3.8", "3.9", "3.10" ] steps: - uses: actions/checkout@v2 diff --git a/platforms/android/app/src/main/cpp/main.c b/platforms/android/app/src/main/cpp/main.c index 81a46f6..c7a93a9 100644 --- a/platforms/android/app/src/main/cpp/main.c +++ b/platforms/android/app/src/main/cpp/main.c @@ -45,11 +45,13 @@ void run_wasm() printf("Running...\n"); result = m3_CallV (f, 40); - if (result) FATAL("m3_Call: %s", result); - long value = *(uint64_t*)(runtime->stack); - printf("Result: %ld\n", value); + uint64_t value = 0; + result = m3_GetResultsV (f, &result); + if (result) FATAL("m3_GetResults: %s", result); + + printf("Result: %lld\n", value); } int main() diff --git a/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h b/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h index cda2b8b..f11b6f6 100644 --- a/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h +++ b/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h @@ -326,7 +326,7 @@ namespace wasm3 { * * This function provides a way to pass integer/float types, by first converting them to strings, * and then letting WASM3 do the reverse conversion. This is to be fixed once WASM3 gains an equivalent - * of m3_CallWithArgs which can accept arbitrary types, not just strings. + * of m3_CallArgv which can accept arbitrary types, not just strings. * * Note that the type of the return value must be explicitly specified as a template argument. * @@ -339,7 +339,7 @@ namespace wasm3 { for (size_t i = 0; i < sizeof...(Args); ++i) { argv[i] = argv_str[i].c_str(); } - M3Result res = m3_CallWithArgs(m_func, sizeof...(args), argv); + M3Result res = m3_CallArgv(m_func, sizeof...(args), argv); detail::check_error(res); Ret ret; /* FIXME: there should be a public API to get the return value */ diff --git a/platforms/ios/wasm3/main.c b/platforms/ios/wasm3/main.c index a22e937..f36a3cd 100644 --- a/platforms/ios/wasm3/main.c +++ b/platforms/ios/wasm3/main.c @@ -80,7 +80,7 @@ void run_wasm() const char* i_argv[2] = { FIB_ARG_VALUE, NULL }; clock_t start = clock(); - result = m3_CallArgV (f, 1, i_argv); + result = m3_CallArgv (f, 1, i_argv); clock_t end = clock(); if (result) FATAL("m3_Call: %s", result);