mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
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.
This commit is contained in:
parent
2f34986eb0
commit
0d5cfd9117
13
mk/crates.mk
13
mk/crates.mk
@ -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 :=
|
||||
@ -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
|
||||
DEPS_syntax_ext := syntax fmt_macros
|
||||
|
14
mk/tests.mk
14
mk/tests.mk
@ -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 \
|
||||
@ -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)
|
||||
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
#![feature(iter_arith)]
|
||||
#![feature(pattern)]
|
||||
#![feature(rand)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(set_recovery)]
|
||||
#![feature(slice_bytes)]
|
||||
#![feature(step_by)]
|
||||
@ -33,8 +32,6 @@
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(unicode)]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
|
||||
extern crate collections;
|
||||
extern crate test;
|
||||
extern crate rustc_unicode;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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::*;
|
||||
@ -1544,8 +1539,6 @@ Options:
|
||||
|
||||
let generated_usage = usage("Usage: fruits", &optgroups);
|
||||
|
||||
debug!("expected: <<{}>>", expected);
|
||||
debug!("generated: <<{}>>", generated_usage);
|
||||
assert_eq!(generated_usage, expected);
|
||||
}
|
||||
|
||||
@ -1573,8 +1566,6 @@ Options:
|
||||
|
||||
let usage = usage("Usage: fruits", &optgroups);
|
||||
|
||||
debug!("expected: <<{}>>", expected);
|
||||
debug!("generated: <<{}>>", usage);
|
||||
assert!(usage == expected)
|
||||
}
|
||||
|
||||
@ -1601,8 +1592,6 @@ Options:
|
||||
|
||||
let usage = usage("Usage: fruits", &optgroups);
|
||||
|
||||
debug!("expected: <<{}>>", expected);
|
||||
debug!("generated: <<{}>>", usage);
|
||||
assert!(usage == expected)
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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) => ({
|
||||
|
@ -11,4 +11,3 @@ crate-type = ["dylib", "rlib"]
|
||||
[dependencies]
|
||||
getopts = { path = "../libgetopts" }
|
||||
term = { path = "../libterm" }
|
||||
serialize = { path = "../libserialize" }
|
||||
|
@ -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;
|
||||
|
||||
@ -56,7 +54,6 @@ use self::NamePadding::*;
|
||||
use self::OutputLocation::*;
|
||||
|
||||
use stats::Stats;
|
||||
use serialize::Encodable;
|
||||
use std::boxed::FnBox;
|
||||
use term::Terminal;
|
||||
|
||||
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user