Skip to content

Commit

Permalink
Auto merge of #32009 - alexcrichton:trim-fulldeps, r=brson
Browse files Browse the repository at this point in the history
mk: Distribute fewer TARGET_CRATES

Right now everything in TARGET_CRATES is built by default for all non-fulldeps
tests and is distributed by default for all target standard library packages.
Currenly this includes a number of unstable crates which are rarely used such as
`graphviz` and `rbml`>

This commit trims down the set of `TARGET_CRATES`, moves a number of tests to
`*-fulldeps` as a result, and trims down the dependencies of libtest so we can
distribute fewer crates in the `rust-std` packages.
  • Loading branch information
bors committed Mar 8, 2016
2 parents 8f0479b + 0d5cfd9 commit eabfc16
Show file tree
Hide file tree
Showing 38 changed files with 19 additions and 59 deletions.
13 changes: 7 additions & 6 deletions mk/crates.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@
# automatically generated for all stage/host/target combinations.
################################################################################

TARGET_CRATES := libc std flate arena term \
serialize getopts collections test rand \
log graphviz core rbml alloc \
TARGET_CRATES := libc std term \
getopts collections test rand \
core alloc \
rustc_unicode rustc_bitflags \
alloc_system alloc_jemalloc
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
rustc_data_structures rustc_front rustc_platform_intrinsics \
rustc_plugin rustc_metadata rustc_passes
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
flate arena graphviz rbml log serialize
TOOLS := compiletest rustdoc rustc rustbook error_index_generator

DEPS_core :=
Expand All @@ -84,8 +85,8 @@ DEPS_log := std
DEPS_num := std
DEPS_rbml := std log serialize
DEPS_serialize := std log
DEPS_term := std log
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
DEPS_term := std
DEPS_test := std getopts term native:rust_test_helpers

DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
DEPS_syntax_ext := syntax fmt_macros
Expand Down
14 changes: 9 additions & 5 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
Expand All @@ -317,6 +314,15 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
# able to build a compiler (when the target triple is in the set of host triples)
ifneq ($$(findstring $(2),$$(CFG_HOST)),)

check-stage$(1)-T-$(2)-H-$(3)-exec: \
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec

check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec

check-stage$(1)-T-$(2)-H-$(3)-crates-exec: \
$$(foreach crate,$$(TEST_CRATES), \
check-stage$(1)-T-$(2)-H-$(3)-$$(crate)-exec)
Expand All @@ -340,9 +346,7 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-exec \
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-valgrind-exec \
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-exec

endef
Expand Down
5 changes: 1 addition & 4 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,13 @@
#![feature(unsize)]

#![cfg_attr(not(test), feature(raw, fn_traits, placement_new_protocol))]
#![cfg_attr(test, feature(test, rustc_private, box_heap))]
#![cfg_attr(test, feature(test, box_heap))]

// Allow testing this library

#[cfg(test)]
#[macro_use]
extern crate std;
#[cfg(test)]
#[macro_use]
extern crate log;

// Heaps provided for low-level allocation strategies

Expand Down
3 changes: 0 additions & 3 deletions src/libcollectionstest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#![feature(iter_arith)]
#![feature(pattern)]
#![feature(rand)]
#![feature(rustc_private)]
#![feature(set_recovery)]
#![feature(slice_bytes)]
#![feature(step_by)]
Expand All @@ -33,8 +32,6 @@
#![feature(unboxed_closures)]
#![feature(unicode)]

#[macro_use] extern crate log;

extern crate collections;
extern crate test;
extern crate rustc_unicode;
Expand Down
2 changes: 0 additions & 2 deletions src/libcollectionstest/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,6 @@ fn vec_str_conversions() {
while i < n1 {
let a: u8 = s1.as_bytes()[i];
let b: u8 = s2.as_bytes()[i];
debug!("{}", a);
debug!("{}", b);
assert_eq!(a, b);
i += 1;
}
Expand Down
4 changes: 0 additions & 4 deletions src/libcollectionstest/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ fn test_simple() {
assert_eq!(d.len(), 3);
d.push_front(1);
assert_eq!(d.len(), 4);
debug!("{}", d[0]);
debug!("{}", d[1]);
debug!("{}", d[2]);
debug!("{}", d[3]);
assert_eq!(d[0], 1);
assert_eq!(d[1], 2);
assert_eq!(d[2], 3);
Expand Down
13 changes: 0 additions & 13 deletions src/libgetopts/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
#![deny(missing_docs)]
#![feature(staged_api)]
#![feature(str_char)]
#![cfg_attr(test, feature(rustc_private))]

#[cfg(test)]
#[macro_use]
extern crate log;

use self::Name::*;
use self::HasArg::*;
Expand Down Expand Up @@ -1544,8 +1539,6 @@ Options:

let generated_usage = usage("Usage: fruits", &optgroups);

debug!("expected: <<{}>>", expected);
debug!("generated: <<{}>>", generated_usage);
assert_eq!(generated_usage, expected);
}

Expand Down Expand Up @@ -1573,8 +1566,6 @@ Options:

let usage = usage("Usage: fruits", &optgroups);

debug!("expected: <<{}>>", expected);
debug!("generated: <<{}>>", usage);
assert!(usage == expected)
}

Expand All @@ -1601,8 +1592,6 @@ Options:

let usage = usage("Usage: fruits", &optgroups);

debug!("expected: <<{}>>", expected);
debug!("generated: <<{}>>", usage);
assert!(usage == expected)
}

Expand All @@ -1617,8 +1606,6 @@ Options:
let expected = "Usage: fruits -b VAL [-a VAL] [-k] [-p [VAL]] [-l VAL]..".to_string();
let generated_usage = short_usage("fruits", &optgroups);

debug!("expected: <<{}>>", expected);
debug!("generated: <<{}>>", generated_usage);
assert_eq!(generated_usage, expected);
}

Expand Down
5 changes: 1 addition & 4 deletions src/librand/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,13 @@
#![feature(custom_attribute)]
#![allow(unused_attributes)]

#![cfg_attr(test, feature(test, rand, rustc_private))]
#![cfg_attr(test, feature(test, rand))]

#![allow(deprecated)]

#[cfg(test)]
#[macro_use]
extern crate std;
#[cfg(test)]
#[macro_use]
extern crate log;

use core::f64;
use core::intrinsics;
Expand Down
1 change: 0 additions & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@
#![cfg_attr(not(stage0), deny(warnings))]

#[cfg(test)] extern crate test;
#[cfg(test)] #[macro_use] extern crate log;

// We want to reexport a few macros from core but libcore has already been
// imported by the compiler (via our #[no_std] attribute) In this case we just
Expand Down
12 changes: 0 additions & 12 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,6 @@ macro_rules! select {
})
}

// When testing the standard library, we link to the liblog crate to get the
// logging macros. In doing so, the liblog crate was linked against the real
// version of libstd, and uses a different std::fmt module than the test crate
// uses. To get around this difference, we redefine the log!() macro here to be
// just a dumb version of what it should be.
#[cfg(test)]
macro_rules! log {
($lvl:expr, $($args:tt)*) => (
if log_enabled!($lvl) { println!($($args)*) }
)
}

#[cfg(test)]
macro_rules! assert_approx_eq {
($a:expr, $b:expr) => ({
Expand Down
1 change: 0 additions & 1 deletion src/libtest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ crate-type = ["dylib", "rlib"]
[dependencies]
getopts = { path = "../libgetopts" }
term = { path = "../libterm" }
serialize = { path = "../libserialize" }
5 changes: 1 addition & 4 deletions src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
#![feature(staged_api)]

extern crate getopts;
extern crate serialize;
extern crate serialize as rustc_serialize;
extern crate term;
extern crate libc;

Expand All @@ -56,7 +54,6 @@ use self::NamePadding::*;
use self::OutputLocation::*;

use stats::Stats;
use serialize::Encodable;
use std::boxed::FnBox;
use term::Terminal;

Expand Down Expand Up @@ -215,7 +212,7 @@ pub struct TestDescAndFn {
pub testfn: TestFn,
}

#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug, Copy)]
#[derive(Clone, PartialEq, Debug, Copy)]
pub struct Metric {
value: f64,
noise: f64,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit eabfc16

Please sign in to comment.