mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Rollup merge of #37488 - frewsxcv:quiet-travis, r=alexcrichton
Use quieter test output when running tests on Travis CI. Fixes https://github.com/rust-lang/rust/issues/36788.
This commit is contained in:
commit
d2f4a9d7be
@ -15,7 +15,7 @@ before_install:
|
|||||||
script:
|
script:
|
||||||
- docker run -v `pwd`:/build rust
|
- docker run -v `pwd`:/build rust
|
||||||
sh -c "
|
sh -c "
|
||||||
./configure --enable-rustbuild --llvm-root=/usr/lib/llvm-3.7 &&
|
./configure --enable-rustbuild --llvm-root=/usr/lib/llvm-3.7 --enable-quiet-tests &&
|
||||||
make tidy &&
|
make tidy &&
|
||||||
make check -j4
|
make check -j4
|
||||||
"
|
"
|
||||||
|
1
configure
vendored
1
configure
vendored
@ -615,6 +615,7 @@ opt docs 1 "build standard library documentation"
|
|||||||
opt compiler-docs 0 "build compiler documentation"
|
opt compiler-docs 0 "build compiler documentation"
|
||||||
opt optimize-tests 1 "build tests with optimizations"
|
opt optimize-tests 1 "build tests with optimizations"
|
||||||
opt debuginfo-tests 0 "build tests with debugger metadata"
|
opt debuginfo-tests 0 "build tests with debugger metadata"
|
||||||
|
opt quiet-tests 0 "enable quieter output when running tests"
|
||||||
opt libcpp 1 "build llvm with libc++ instead of libstdc++ when using clang"
|
opt libcpp 1 "build llvm with libc++ instead of libstdc++ when using clang"
|
||||||
opt llvm-assertions 0 "build LLVM with assertions"
|
opt llvm-assertions 0 "build LLVM with assertions"
|
||||||
opt debug-assertions 0 "build with debugging assertions"
|
opt debug-assertions 0 "build with debugging assertions"
|
||||||
|
@ -187,6 +187,10 @@ pub fn compiletest(build: &Build,
|
|||||||
cmd.arg("--verbose");
|
cmd.arg("--verbose");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if build.config.quiet_tests {
|
||||||
|
cmd.arg("--quiet");
|
||||||
|
}
|
||||||
|
|
||||||
// Only pass correct values for these flags for the `run-make` suite as it
|
// Only pass correct values for these flags for the `run-make` suite as it
|
||||||
// requires that a C++ compiler was configured which isn't always the case.
|
// requires that a C++ compiler was configured which isn't always the case.
|
||||||
if suite == "run-make" {
|
if suite == "run-make" {
|
||||||
@ -277,7 +281,13 @@ fn markdown_test(build: &Build, compiler: &Compiler, markdown: &Path) {
|
|||||||
build.add_rustc_lib_path(compiler, &mut cmd);
|
build.add_rustc_lib_path(compiler, &mut cmd);
|
||||||
cmd.arg("--test");
|
cmd.arg("--test");
|
||||||
cmd.arg(markdown);
|
cmd.arg(markdown);
|
||||||
cmd.arg("--test-args").arg(build.flags.args.join(" "));
|
|
||||||
|
let mut test_args = build.flags.args.join(" ");
|
||||||
|
if build.config.quiet_tests {
|
||||||
|
test_args.push_str(" --quiet");
|
||||||
|
}
|
||||||
|
cmd.arg("--test-args").arg(test_args);
|
||||||
|
|
||||||
build.run(&mut cmd);
|
build.run(&mut cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,6 +377,11 @@ pub fn krate(build: &Build,
|
|||||||
dylib_path.insert(0, build.sysroot_libdir(compiler, target));
|
dylib_path.insert(0, build.sysroot_libdir(compiler, target));
|
||||||
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
|
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
|
||||||
|
|
||||||
|
if build.config.quiet_tests {
|
||||||
|
cargo.arg("--");
|
||||||
|
cargo.arg("--quiet");
|
||||||
|
}
|
||||||
|
|
||||||
if target.contains("android") {
|
if target.contains("android") {
|
||||||
build.run(cargo.arg("--no-run"));
|
build.run(cargo.arg("--no-run"));
|
||||||
krate_android(build, compiler, target, mode);
|
krate_android(build, compiler, target, mode);
|
||||||
|
@ -77,6 +77,7 @@ pub struct Config {
|
|||||||
|
|
||||||
// misc
|
// misc
|
||||||
pub channel: String,
|
pub channel: String,
|
||||||
|
pub quiet_tests: bool,
|
||||||
// Fallback musl-root for all targets
|
// Fallback musl-root for all targets
|
||||||
pub musl_root: Option<PathBuf>,
|
pub musl_root: Option<PathBuf>,
|
||||||
pub prefix: Option<String>,
|
pub prefix: Option<String>,
|
||||||
@ -338,6 +339,7 @@ impl Config {
|
|||||||
("RPATH", self.rust_rpath),
|
("RPATH", self.rust_rpath),
|
||||||
("OPTIMIZE_TESTS", self.rust_optimize_tests),
|
("OPTIMIZE_TESTS", self.rust_optimize_tests),
|
||||||
("DEBUGINFO_TESTS", self.rust_debuginfo_tests),
|
("DEBUGINFO_TESTS", self.rust_debuginfo_tests),
|
||||||
|
("QUIET_TESTS", self.quiet_tests),
|
||||||
("LOCAL_REBUILD", self.local_rebuild),
|
("LOCAL_REBUILD", self.local_rebuild),
|
||||||
("NINJA", self.ninja),
|
("NINJA", self.ninja),
|
||||||
("CODEGEN_TESTS", self.codegen_tests),
|
("CODEGEN_TESTS", self.codegen_tests),
|
||||||
|
Loading…
Reference in New Issue
Block a user