Skip to content

Commit eabfc16

Browse files
committed
Auto merge of #32009 - alexcrichton:trim-fulldeps, r=brson
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.
2 parents 8f0479b + 0d5cfd9 commit eabfc16

38 files changed

+19
-59
lines changed

mk/crates.mk

+7-6
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std flate arena term \
53-
serialize getopts collections test rand \
54-
log graphviz core rbml alloc \
52+
TARGET_CRATES := libc std term \
53+
getopts collections test rand \
54+
core alloc \
5555
rustc_unicode rustc_bitflags \
5656
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes
61-
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros
61+
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
62+
flate arena graphviz rbml log serialize
6263
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
6364

6465
DEPS_core :=
@@ -84,8 +85,8 @@ DEPS_log := std
8485
DEPS_num := std
8586
DEPS_rbml := std log serialize
8687
DEPS_serialize := std log
87-
DEPS_term := std log
88-
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
88+
DEPS_term := std
89+
DEPS_test := std getopts term native:rust_test_helpers
8990

9091
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9192
DEPS_syntax_ext := syntax fmt_macros

mk/tests.mk

+9-5
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
299299
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
300300
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
301301
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
302-
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
303-
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
304-
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
305302
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
306303
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
307304
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
@@ -317,6 +314,15 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
317314
# able to build a compiler (when the target triple is in the set of host triples)
318315
ifneq ($$(findstring $(2),$$(CFG_HOST)),)
319316

317+
check-stage$(1)-T-$(2)-H-$(3)-exec: \
318+
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
319+
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
320+
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec
321+
322+
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
323+
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
324+
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec
325+
320326
check-stage$(1)-T-$(2)-H-$(3)-crates-exec: \
321327
$$(foreach crate,$$(TEST_CRATES), \
322328
check-stage$(1)-T-$(2)-H-$(3)-$$(crate)-exec)
@@ -340,9 +346,7 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
340346
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
341347
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-exec \
342348
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-valgrind-exec \
343-
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
344349
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
345-
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec \
346350
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-exec
347351

348352
endef

src/liballoc/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,13 @@
9292
#![feature(unsize)]
9393

9494
#![cfg_attr(not(test), feature(raw, fn_traits, placement_new_protocol))]
95-
#![cfg_attr(test, feature(test, rustc_private, box_heap))]
95+
#![cfg_attr(test, feature(test, box_heap))]
9696

9797
// Allow testing this library
9898

9999
#[cfg(test)]
100100
#[macro_use]
101101
extern crate std;
102-
#[cfg(test)]
103-
#[macro_use]
104-
extern crate log;
105102

106103
// Heaps provided for low-level allocation strategies
107104

src/libcollectionstest/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#![feature(iter_arith)]
2424
#![feature(pattern)]
2525
#![feature(rand)]
26-
#![feature(rustc_private)]
2726
#![feature(set_recovery)]
2827
#![feature(slice_bytes)]
2928
#![feature(step_by)]
@@ -33,8 +32,6 @@
3332
#![feature(unboxed_closures)]
3433
#![feature(unicode)]
3534

36-
#[macro_use] extern crate log;
37-
3835
extern crate collections;
3936
extern crate test;
4037
extern crate rustc_unicode;

src/libcollectionstest/str.rs

-2
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,6 @@ fn vec_str_conversions() {
626626
while i < n1 {
627627
let a: u8 = s1.as_bytes()[i];
628628
let b: u8 = s2.as_bytes()[i];
629-
debug!("{}", a);
630-
debug!("{}", b);
631629
assert_eq!(a, b);
632630
i += 1;
633631
}

src/libcollectionstest/vec_deque.rs

-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ fn test_simple() {
4545
assert_eq!(d.len(), 3);
4646
d.push_front(1);
4747
assert_eq!(d.len(), 4);
48-
debug!("{}", d[0]);
49-
debug!("{}", d[1]);
50-
debug!("{}", d[2]);
51-
debug!("{}", d[3]);
5248
assert_eq!(d[0], 1);
5349
assert_eq!(d[1], 2);
5450
assert_eq!(d[2], 3);

src/libgetopts/lib.rs

-13
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@
9292
#![deny(missing_docs)]
9393
#![feature(staged_api)]
9494
#![feature(str_char)]
95-
#![cfg_attr(test, feature(rustc_private))]
96-
97-
#[cfg(test)]
98-
#[macro_use]
99-
extern crate log;
10095

10196
use self::Name::*;
10297
use self::HasArg::*;
@@ -1544,8 +1539,6 @@ Options:
15441539

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

1547-
debug!("expected: <<{}>>", expected);
1548-
debug!("generated: <<{}>>", generated_usage);
15491542
assert_eq!(generated_usage, expected);
15501543
}
15511544

@@ -1573,8 +1566,6 @@ Options:
15731566

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

1576-
debug!("expected: <<{}>>", expected);
1577-
debug!("generated: <<{}>>", usage);
15781569
assert!(usage == expected)
15791570
}
15801571

@@ -1601,8 +1592,6 @@ Options:
16011592

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

1604-
debug!("expected: <<{}>>", expected);
1605-
debug!("generated: <<{}>>", usage);
16061595
assert!(usage == expected)
16071596
}
16081597

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

1620-
debug!("expected: <<{}>>", expected);
1621-
debug!("generated: <<{}>>", generated_usage);
16221609
assert_eq!(generated_usage, expected);
16231610
}
16241611

src/librand/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,13 @@
3636
#![feature(custom_attribute)]
3737
#![allow(unused_attributes)]
3838

39-
#![cfg_attr(test, feature(test, rand, rustc_private))]
39+
#![cfg_attr(test, feature(test, rand))]
4040

4141
#![allow(deprecated)]
4242

4343
#[cfg(test)]
4444
#[macro_use]
4545
extern crate std;
46-
#[cfg(test)]
47-
#[macro_use]
48-
extern crate log;
4946

5047
use core::f64;
5148
use core::intrinsics;

src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@
281281
#![cfg_attr(not(stage0), deny(warnings))]
282282

283283
#[cfg(test)] extern crate test;
284-
#[cfg(test)] #[macro_use] extern crate log;
285284

286285
// We want to reexport a few macros from core but libcore has already been
287286
// imported by the compiler (via our #[no_std] attribute) In this case we just

src/libstd/macros.rs

-12
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,6 @@ macro_rules! select {
173173
})
174174
}
175175

176-
// When testing the standard library, we link to the liblog crate to get the
177-
// logging macros. In doing so, the liblog crate was linked against the real
178-
// version of libstd, and uses a different std::fmt module than the test crate
179-
// uses. To get around this difference, we redefine the log!() macro here to be
180-
// just a dumb version of what it should be.
181-
#[cfg(test)]
182-
macro_rules! log {
183-
($lvl:expr, $($args:tt)*) => (
184-
if log_enabled!($lvl) { println!($($args)*) }
185-
)
186-
}
187-
188176
#[cfg(test)]
189177
macro_rules! assert_approx_eq {
190178
($a:expr, $b:expr) => ({

src/libtest/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ crate-type = ["dylib", "rlib"]
1111
[dependencies]
1212
getopts = { path = "../libgetopts" }
1313
term = { path = "../libterm" }
14-
serialize = { path = "../libserialize" }

src/libtest/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#![feature(staged_api)]
4343

4444
extern crate getopts;
45-
extern crate serialize;
46-
extern crate serialize as rustc_serialize;
4745
extern crate term;
4846
extern crate libc;
4947

@@ -56,7 +54,6 @@ use self::NamePadding::*;
5654
use self::OutputLocation::*;
5755

5856
use stats::Stats;
59-
use serialize::Encodable;
6057
use std::boxed::FnBox;
6158
use term::Terminal;
6259

@@ -215,7 +212,7 @@ pub struct TestDescAndFn {
215212
pub testfn: TestFn,
216213
}
217214

218-
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug, Copy)]
215+
#[derive(Clone, PartialEq, Debug, Copy)]
219216
pub struct Metric {
220217
value: f64,
221218
noise: f64,

0 commit comments

Comments
 (0)