Use compiletest directives for properly only running wasm32-wasip1 tests on that target
This commit is contained in:
parent
1dcbc23c4b
commit
08853804d0
@ -1,3 +1,5 @@
|
||||
//@ only-wasm32-wasip1
|
||||
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{rustc, tmp_dir};
|
||||
@ -5,10 +7,6 @@ use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").run();
|
||||
|
||||
let file = tmp_dir().join("foo.wasm");
|
||||
|
@ -1,13 +1,10 @@
|
||||
//@ only-wasm32-wasip1
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{rustc, tmp_dir, wasmparser};
|
||||
use std::collections::HashMap;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").run();
|
||||
rustc().input("bar.rs").target("wasm32-wasip1").arg("-Clto").opt().run();
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ only-wasm32-wasip1
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{tmp_dir, wasmparser, rustc};
|
||||
@ -5,10 +6,6 @@ use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").opt().run();
|
||||
|
||||
verify(&tmp_dir().join("foo.wasm"));
|
||||
|
@ -1,3 +1,5 @@
|
||||
//@ only-wasm32-wasip1
|
||||
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{tmp_dir, wasmparser, rustc};
|
||||
@ -6,10 +8,6 @@ use std::path::Path;
|
||||
use wasmparser::ExternalKind::*;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
test(&[]);
|
||||
test(&["-O"]);
|
||||
test(&["-Clto"]);
|
||||
|
@ -1,3 +1,5 @@
|
||||
//@ only-wasm32-wasip1
|
||||
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{tmp_dir, wasmparser, rustc};
|
||||
@ -5,10 +7,6 @@ use std::collections::HashMap;
|
||||
use wasmparser::TypeRef::Func;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").run();
|
||||
rustc()
|
||||
.input("bar.rs")
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ only-wasm32-wasip1
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate run_make_support;
|
||||
@ -5,10 +6,6 @@ extern crate run_make_support;
|
||||
use run_make_support::{rustc, tmp_dir};
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
test("a");
|
||||
test("b");
|
||||
test("c");
|
||||
|
@ -1,13 +1,11 @@
|
||||
//@ only-wasm32-wasip1
|
||||
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{rustc, tmp_dir, wasmparser};
|
||||
use std::collections::HashMap;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc()
|
||||
.input("main.rs")
|
||||
.target("wasm32-wasip1")
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ only-wasm32-wasip1
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate run_make_support;
|
||||
@ -5,10 +6,6 @@ extern crate run_make_support;
|
||||
use run_make_support::{rustc, tmp_dir};
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").arg("-Clto").opt().run();
|
||||
|
||||
let bytes = std::fs::read(&tmp_dir().join("foo.wasm")).unwrap();
|
||||
|
@ -1,13 +1,10 @@
|
||||
//@ only-wasm32-wasip1
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{rustc, tmp_dir, wasmparser};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
test_file("foo.rs", &[("a", &["foo"]), ("b", &["foo"])]);
|
||||
test_file("bar.rs", &[("m1", &["f", "g"]), ("m2", &["f"])]);
|
||||
test_file("baz.rs", &[("sqlite", &["allocate", "deallocate"])]);
|
||||
|
@ -1,13 +1,10 @@
|
||||
//@ only-wasm32-wasip1
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{rustc, tmp_dir, wasmparser};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").run();
|
||||
verify_symbols(&tmp_dir().join("foo.wasm"));
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").opt().run();
|
||||
|
@ -1,13 +1,10 @@
|
||||
//@ only-wasm32-wasip1
|
||||
extern crate run_make_support;
|
||||
|
||||
use run_make_support::{rustc, tmp_dir, wasmparser};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
|
||||
return;
|
||||
}
|
||||
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").run();
|
||||
verify_symbols(&tmp_dir().join("foo.wasm"));
|
||||
rustc().input("foo.rs").target("wasm32-wasip1").arg("-Clto").run();
|
||||
|
Loading…
x
Reference in New Issue
Block a user