running tests now uses builtin libwasmer
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 29 Oct 2021 14:01:43 +0000 (09:01 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 29 Oct 2021 14:01:43 +0000 (09:01 -0500)
bin/test
src/wasm_runtime.c

index b176bf105994525098140af97b0be0d0b44b35c7..e9ca232f02e76c74dffd72097af3640188dcdd6c 100755 (executable)
--- a/bin/test
+++ b/bin/test
@@ -22,18 +22,18 @@ for test_file in $(find tests/ -name '*.onyx'); do
 
     print_check "$name"
 
-    if command -v wasmer >/dev/null; then
-        if ! ./bin/onyx --use-post-mvp-features "$test_file" -o "./tests/$name.wasm" >/dev/null; then
+    if true; then
+        if ! ./bin/onyx run "$test_file" > ./tmpoutput; then
             printf "\n❌ Failed to compile $name.onyx.\n"
             failed=1
             continue
         fi
         
-        if ! wasmer "./tests/$name.wasm" > ./tmpoutput; then
-            printf "\n❌ Failed to run $name.onyx.\n"
-            failed=1
-            continue
-        fi
+        if ! wasmer "./tests/$name.wasm" > ./tmpoutput; then
+            printf "\n❌ Failed to run $name.onyx.\n"
+            failed=1
+            continue
+        fi
     else
         if ! ./bin/onyx -r js --use-post-mvp-features "$test_file" -o "./tests/$name.wasm" >/dev/null; then
             printf "\n❌ Failed to compile $name.onyx.\n"
@@ -57,7 +57,7 @@ for test_file in $(find tests/ -name '*.onyx'); do
 
     echo "✔ Passed"
 
-    rm "./tests/$name.wasm"
+    rm "./tests/$name.wasm" 2>/dev/null
 done
 rm ./tmpoutput
 
index 540cd2bb8ee95cd5dc8b9a7b47d77499f8ca56bb..11477d28692af03070409a76c319a80792a1491a 100644 (file)
@@ -93,6 +93,5 @@ cleanup:
     if (module)      wasm_module_delete(module);
     if (store)       wasm_store_delete(store);
     if (engine)      wasm_engine_delete(engine);
-    if (wasi_env)    wasi_env_delete(wasi_env);
     return;
 }
\ No newline at end of file