Skip to content

Commit b9cf26c

Browse files
committed
Auto merge of #47106 - EdSchouten:compiletest-cloudabi, r=alexcrichton
Tiny fixes to make compiletest work for CloudABI cross builds I'm currently working toward getting a `src/ci/docker` container working to do isolated/automated builds and testing of `x86_64-unknown-cloudabi`. This is working pretty well, but still requires some fixes to `libtest` and `compiletest`. Here is the first set of fixes that I had to apply.
2 parents b65f0be + 7b5543d commit b9cf26c

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Diff for: src/libtest/lib.rs

-7
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,6 @@ pub struct TestDesc {
203203
pub allow_fail: bool,
204204
}
205205

206-
#[derive(Clone)]
207-
pub struct TestPaths {
208-
pub file: PathBuf, // e.g., compile-test/foo/bar/baz.rs
209-
pub base: PathBuf, // e.g., compile-test, auxiliary
210-
pub relative_dir: PathBuf, // e.g., foo/bar
211-
}
212-
213206
#[derive(Debug)]
214207
pub struct TestDescAndFn {
215208
pub desc: TestDesc,

Diff for: src/tools/compiletest/src/common.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt;
1313
use std::str::FromStr;
1414
use std::path::PathBuf;
1515

16-
use test::{ColorConfig, TestPaths};
16+
use test::ColorConfig;
1717

1818
#[derive(Clone, Copy, PartialEq, Debug)]
1919
pub enum Mode {
@@ -222,6 +222,13 @@ pub struct Config {
222222
pub nodejs: Option<String>,
223223
}
224224

225+
#[derive(Clone)]
226+
pub struct TestPaths {
227+
pub file: PathBuf, // e.g., compile-test/foo/bar/baz.rs
228+
pub base: PathBuf, // e.g., compile-test, auxiliary
229+
pub relative_dir: PathBuf, // e.g., foo/bar
230+
}
231+
225232
/// Used by `ui` tests to generate things like `foo.stderr` from `foo.rs`.
226233
pub fn expected_output_path(testpaths: &TestPaths, revision: Option<&str>, kind: &str) -> PathBuf {
227234
assert!(UI_EXTENSIONS.contains(&kind));

Diff for: src/tools/compiletest/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ use std::path::{Path, PathBuf};
3333
use std::process::Command;
3434
use filetime::FileTime;
3535
use getopts::Options;
36-
use common::Config;
36+
use common::{Config, TestPaths};
3737
use common::{DebugInfoGdb, DebugInfoLldb, Mode, Pretty};
3838
use common::{expected_output_path, UI_EXTENSIONS};
39-
use test::{ColorConfig, TestPaths};
39+
use test::ColorConfig;
4040
use util::logv;
4141

4242
use self::header::EarlyProps;

Diff for: src/tools/compiletest/src/runtest.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use common::Config;
11+
use common::{Config, TestPaths};
1212
use common::{CompileFail, ParseFail, Pretty, RunFail, RunPass, RunPassValgrind};
1313
use common::{Codegen, CodegenUnits, DebugInfoGdb, DebugInfoLldb, Rustdoc};
1414
use common::{Incremental, MirOpt, RunMake, Ui};
@@ -18,7 +18,6 @@ use errors::{self, Error, ErrorKind};
1818
use filetime::FileTime;
1919
use json;
2020
use header::TestProps;
21-
use test::TestPaths;
2221
use util::logv;
2322
use regex::Regex;
2423

Diff for: src/tools/compiletest/src/util.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use common::Config;
1515
const OS_TABLE: &'static [(&'static str, &'static str)] = &[
1616
("android", "android"),
1717
("bitrig", "bitrig"),
18+
("cloudabi", "cloudabi"),
1819
("darwin", "macos"),
1920
("dragonfly", "dragonfly"),
2021
("freebsd", "freebsd"),

0 commit comments

Comments
 (0)