Skip to content

Commit

Permalink
Always run wasm32-unknown-unknown integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
koute committed Dec 11, 2018
1 parent 5a584c1 commit b376298
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
3 changes: 0 additions & 3 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ authors = ["Jan Bujak <[email protected]>"]
lazy_static = "1"
reqwest = { version = "0.9", default-features = false }

[build-dependencies]
rustc_version = "0.2"

[features]
default = []
test_wasm32_unknown_unknown = []
11 changes: 0 additions & 11 deletions integration-tests/build.rs

This file was deleted.

18 changes: 5 additions & 13 deletions integration-tests/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ macro_rules! common_tests { (($($attr:tt)*) $namespace:ident, $target:expr) => {

common_tests!( () asmjs_unknown_emscripten, Target::AsmjsUnknownEmscripten );
common_tests!( () wasm32_unknown_emscripten, Target::Wasm32UnknownEmscripten );
common_tests!( (#[cfg_attr(not(test_wasm32_unknown_unknown), ignore)]) wasm32_unknown_unknown, Target::Wasm32UnknownUnknown );
common_tests!( () wasm32_unknown_unknown, Target::Wasm32UnknownUnknown );

#[test]
fn build_requires_future_cargo_web_target_dep() {
Expand All @@ -377,10 +377,8 @@ fn link_args_per_target() {
assert_builds( Wasm32UnknownEmscripten, "link-args-per-target" );
assert_file_contains( cwd.join( "target/wasm32-unknown-emscripten/debug/link-args-per-target.js" ), "CustomExportNameWasm" );

if cfg!( test_wasm32_unknown_unknown ) {
// This has no flags set, but still should compile.
assert_builds( Wasm32UnknownUnknown, "link-args-per-target" );
}
// This has no flags set, but still should compile.
assert_builds( Wasm32UnknownUnknown, "link-args-per-target" );
}

#[test]
Expand All @@ -393,10 +391,8 @@ fn link_args_for_emscripten() {
assert_builds( Wasm32UnknownEmscripten, "link-args-for-emscripten" );
assert_file_contains( cwd.join( "target/wasm32-unknown-emscripten/debug/link-args-for-emscripten.js" ), "CustomExportNameEmscripten" );

if cfg!( test_wasm32_unknown_unknown ) {
// This has no flags set, but still should compile.
assert_builds( Wasm32UnknownUnknown, "link-args-for-emscripten" );
}
// This has no flags set, but still should compile.
assert_builds( Wasm32UnknownUnknown, "link-args-for-emscripten" );
}

#[test]
Expand Down Expand Up @@ -435,15 +431,13 @@ fn default_target_invalid() {
run( &cwd, &*CARGO_WEB, &["deploy"] ).assert_failure();
}

#[cfg_attr(not(test_wasm32_unknown_unknown), ignore)]
#[test]
fn build_and_run_native_wasm() {
let cwd = crate_path( "native-webasm" );
assert_builds( Target::Wasm32UnknownUnknown, "native-webasm" );
run( &cwd, &*NODEJS, &["run.js"] ).assert_success();
}

#[cfg_attr(not(test_wasm32_unknown_unknown), ignore)]
#[test]
fn cdylib() {
let cwd = crate_path( "cdylib" );
Expand All @@ -452,7 +446,6 @@ fn cdylib() {
run( &cwd, &*NODEJS, &[cwd.join( "target/wasm32-unknown-unknown/debug/cdylib.js" )] ).assert_success();
}

#[cfg_attr(not(test_wasm32_unknown_unknown), ignore)]
#[test]
fn default_target_wasm32_unknown_unknown() {
let cwd = crate_path( "default-target-wasm32-unknown-unknown" );
Expand All @@ -461,7 +454,6 @@ fn default_target_wasm32_unknown_unknown() {
run( &cwd, &*CARGO_WEB, &["deploy"] ).assert_success();
}

#[cfg_attr(not(test_wasm32_unknown_unknown), ignore)]
#[test]
fn prepend_js_includable_only_once() {
let cwd = crate_path( "prepend-js-includable-only-once" );
Expand Down

0 comments on commit b376298

Please sign in to comment.