diff --git a/.gitmodules b/.gitmodules index 186818e..4bceed0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "spec/testsuite"] - path = spec/testsuite - url = https://github.com/webassembly/testsuite +[submodule "tests/spec/testsuite"] + path = tests/spec/testsuite + url = https://github.com/WebAssembly/testsuite.git diff --git a/Cargo.toml b/Cargo.toml index 2f794dd..c3c4907 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ byteorder = "1.0" memory_units = { git = "https://github.com/pepyakin/memory_units.git", rev = "e09093e" } [dev-dependencies] -wabt = "0.1.2" +wabt = "0.2.0" [features] # 32-bit platforms are not supported and not tested. Use this flag if you really want to use diff --git a/check.sh b/check.sh index 6d29690..4f3f402 100755 --- a/check.sh +++ b/check.sh @@ -5,8 +5,5 @@ set -eux cd $(dirname $0) cargo check --tests -cargo check \ - --manifest-path=spec/Cargo.toml \ - --tests cd - diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index c83ab06..b5df657 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -10,7 +10,7 @@ cargo-fuzz = true [dependencies] wasmi = { path = ".." } -wabt = "0.2.1" +wabt = "0.2.0" wasmparser = "0.14.1" [dependencies.libfuzzer-sys] diff --git a/spec/Cargo.toml b/spec/Cargo.toml deleted file mode 100644 index 125774b..0000000 --- a/spec/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "wasmi-spec" -version = "0.0.0" -authors = ["NikVolf "] -license = "MIT/Apache-2.0" -readme = "README.md" -repository = "https://github.com/nikvolf/parity-wasm" -homepage = "https://github.com/nikvolf/parity-wasm" -description = "parity-wasm testsuite" - -[dependencies] -wasmi = { path = ".." } -wabt = "0.2.0" diff --git a/test.sh b/test.sh index caad167..3cef9ad 100755 --- a/test.sh +++ b/test.sh @@ -5,6 +5,5 @@ set -eux cd $(dirname $0) time cargo test -time cargo test --manifest-path=spec/Cargo.toml cd - diff --git a/spec/src/fixtures.rs b/tests/spec/mod.rs similarity index 98% rename from spec/src/fixtures.rs rename to tests/spec/mod.rs index bfd122c..388fd30 100644 --- a/spec/src/fixtures.rs +++ b/tests/spec/mod.rs @@ -1,8 +1,10 @@ +mod run; + macro_rules! run_test { ($label: expr, $test_name: ident) => ( #[test] fn $test_name() { - ::run::spec($label) + self::run::spec($label) } ); } diff --git a/spec/src/run.rs b/tests/spec/run.rs similarity index 99% rename from spec/src/run.rs rename to tests/spec/run.rs index f348df0..0938f97 100644 --- a/spec/src/run.rs +++ b/tests/spec/run.rs @@ -338,7 +338,7 @@ pub fn spec(name: &str) { fn try_spec(name: &str) -> Result<(), Error> { let mut spec_driver = SpecDriver::new(); - let spec_script_path = format!("testsuite/{}.wast", name); + let spec_script_path = format!("tests/spec/testsuite/{}.wast", name); let mut parser = ScriptParser::from_file(spec_script_path).expect("Can't read spec script"); while let Some(Command { kind, line }) = parser.next()? { match kind { diff --git a/spec/testsuite b/tests/spec/testsuite similarity index 100% rename from spec/testsuite rename to tests/spec/testsuite diff --git a/spec/src/lib.rs b/tests/spec_shim.rs similarity index 51% rename from spec/src/lib.rs rename to tests/spec_shim.rs index 21bac1a..094d833 100644 --- a/spec/src/lib.rs +++ b/tests/spec_shim.rs @@ -1,6 +1,6 @@ +//! Official spec testsuite. extern crate wasmi; extern crate wabt; -mod run; -mod fixtures; +mod spec;