5510 Commits

Author SHA1 Message Date
bors[bot]
e19dbbee1d
Merge #1382
1382: Test Refactor r=syrusakbary a=syrusakbary

# Description

This PR is the continuation of #1380.
It refactors our testing infrastructure based on various points:
* There is no longer a "default compiler" on tests
* Tests are automatically generated for: emscripten and wasi
* It accelerates testing into multiple threads when possible (with the exception of the llvm backend)
* It automatically detects the backends available in the host

Summary of changes:
* [x] Removed all extra logic for test creation in emscripten test generator
* [x] Removed all extra logic for test creation in the wasi test generator
* [x] Divided wasmer wast test in different files (under `tests/custom/`)
* [x] Refactored trap asserts using the wast format
* [x] Improved the build script by adding emscripten and wasi test generators (separated from build)
* [x] Improved WASI errors to be Rust error types (by deriving from `thiserror::Error`)
* [x] Fixed toolchain error creation
* [x] Removed leaking of testing logic from generators into build
* [x] Refactored import tests to be compatible with multiple backends
* [x] Improved wasmer binary to work even when no backends are set (useful for testing without any backend available).
* [x] Removed assumption that Cranelift will be the default in the `wasmer` binary
* [x] Migrated middleware

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Syrus <me@syrusakbary.com>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2020-04-16 23:23:32 +00:00
Syrus
e714f55189 Fixed dereference error 2020-04-16 16:21:09 -07:00
Syrus
c79b736036 Addedd changes into Changelog 2020-04-16 15:49:23 -07:00
Syrus
565462d349 Re-enabled middleware 2020-04-16 15:47:01 -07:00
Syrus
ab4a51dcec Detect singlepass first 2020-04-16 15:33:48 -07:00
Syrus
11a0ab08d4 Fixed lint issue 2020-04-16 15:31:55 -07:00
Syrus
b159163927 Added README to custom wast tests dir 2020-04-16 15:30:53 -07:00
Syrus
9d63da5740 Make makefile standard for wasitests 2020-04-16 15:30:53 -07:00
Mark McCaskey
ce6211579f Conditionally compile default_compiler and related functions 2020-04-16 14:44:59 -07:00
Syrus
c9713e485c Fixed makefile 2020-04-16 14:16:23 -07:00
Syrus
695ac6d1d3 Fixed llvm tests running cranelift/singlepass 2020-04-16 13:52:24 -07:00
Syrus
a858401b11 Fixed forgot name/body improvement in processors 2020-04-16 13:47:03 -07:00
Syrus
a2d2710010 Fixed suggestions based on feedback 2020-04-16 13:46:22 -07:00
Syrus
fbdfa62d3c Fixed suggestions 2020-04-16 13:46:22 -07:00
Syrus Akbary
80ed212a9f
Update tests/test-generator/src/processors.rs
Co-Authored-By: Mark McCaskey <5770194+MarkMcCaskey@users.noreply.github.com>
2020-04-16 13:46:12 -07:00
Syrus Akbary
6021d1735a
Update tests/test-generator/src/processors.rs
Co-Authored-By: Mark McCaskey <5770194+MarkMcCaskey@users.noreply.github.com>
2020-04-16 13:45:23 -07:00
Syrus Akbary
8b177b5320
Update tests/test-generator/src/lib.rs
Co-Authored-By: Mark McCaskey <5770194+MarkMcCaskey@users.noreply.github.com>
2020-04-16 13:40:22 -07:00
Syrus
081ab36237 Simplified azure testing 2020-04-16 13:26:24 -07:00
Syrus
7071e48c2b Trying to make wasitests setup work in windows 2020-04-16 13:12:06 -07:00
Syrus
f8aec14895 Trying to make the Makefile Windows compatible 2020-04-16 13:08:39 -07:00
Syrus
f222658dcb Added DynamicFunc::new method for non x86 architectures 2020-04-16 12:53:17 -07:00
Syrus
51ed488b49 Added comments on features 2020-04-16 12:45:34 -07:00
Syrus
6904961325 Ignore basic test as it doesn’t run in Aarch64 2020-04-16 12:42:21 -07:00
Syrus
4e489a1bde Moved tests from runtime to high_level_api 2020-04-16 12:34:54 -07:00
Syrus
595f5bb472 Moved cache testing to the general tests 2020-04-16 12:22:28 -07:00
Syrus
636b0291af Fixed Windows build. Make Azure windows simpler 2020-04-16 12:00:35 -07:00
Syrus
b301ac85be Improved tests to use available compilers 2020-04-16 11:52:29 -07:00
Syrus Akbary
5f5928dfbd
Update Cargo.toml
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-04-16 11:38:36 -07:00
Syrus
9dc587e611 Fixed singlepass tests on Windows 2020-04-15 19:47:58 -07:00
Syrus
444a68d1a4 Test only on the backends available 2020-04-15 19:39:10 -07:00
Syrus
6415579ed6 Fixed command names 2020-04-15 19:35:20 -07:00
Syrus
8a669cfda5 Fixed example testing 2020-04-15 19:34:25 -07:00
Syrus
21cef317b1 Fixed syntax 2020-04-15 18:48:54 -07:00
Syrus
2a897fd5d2 Ignore wasi tests on aarch64 2020-04-15 18:42:07 -07:00
Syrus
8369431b34 Removed unneeded parenthesis on ARM 2020-04-15 18:37:47 -07:00
Syrus
21f7baec99 Fixed lints 2020-04-15 18:29:53 -07:00
Syrus
28351402aa Formatted rust files 2020-04-15 18:29:53 -07:00
Syrus
bb3c1a6e19 Fixed suggestions 2020-04-15 18:29:53 -07:00
Syrus
23a18965b1 Improve llvm compat 2020-04-15 18:29:13 -07:00
Syrus
cce851f22f Improved tests semantics 2020-04-15 18:29:13 -07:00
Syrus
37afcd33df Removed unused code on wasitests 2020-04-15 18:29:13 -07:00
Syrus
7b41c2b843 Test forgotten function in imports 2020-04-15 18:29:13 -07:00
Syrus
dfb7432595 Moved processors out of build 2020-04-15 18:29:13 -07:00
Syrus Akbary
c5415216d7
Update build.rs (truthy env unwrap suggestion) 2020-04-15 17:52:54 -07:00
Syrus Akbary
b1a7dbe212
Update tests/generate-wasi-tests/src/set_up_toolchain.rs
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-04-15 17:49:01 -07:00
Syrus Akbary
6a840a753a
Update Cargo.toml
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-04-15 17:48:21 -07:00
Syrus Akbary
e14a74063b
Update build.rs
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-04-15 17:48:03 -07:00
Syrus Akbary
8c9d8b23cb
Update tests/custom/multiple-traps.wast
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-04-15 17:47:31 -07:00
Syrus
51a454659b Only run shell tput in *Unix 2020-04-15 16:35:02 -07:00
Syrus
52c969a71a Merge branch 'master' into test-refactor-2 2020-04-15 16:32:37 -07:00