Split up test suite so it compiles in parallel

This commit is contained in:
David Tolnay 2017-02-24 15:32:13 -08:00
parent 59ec931d8f
commit 75e6da02d3
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
9 changed files with 32 additions and 31 deletions

View File

@ -5,10 +5,7 @@ authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
publish = false publish = false
[features] [features]
unstable-testing = [ unstable-testing = ["compiletest_rs"]
"compiletest_rs",
"serde/unstable-testing",
]
[dev-dependencies] [dev-dependencies]
fnv = "1.0" fnv = "1.0"
@ -19,7 +16,3 @@ serde_test = { path = "../serde_test" }
[dependencies] [dependencies]
compiletest_rs = { version = "0.2", optional = true } compiletest_rs = { version = "0.2", optional = true }
[[test]]
name = "test"
path = "tests/test.rs"

View File

@ -1,3 +1,5 @@
#![cfg(feature = "unstable-testing")]
extern crate compiletest_rs as compiletest; extern crate compiletest_rs as compiletest;
use std::env; use std::env;

View File

@ -1,23 +0,0 @@
#![cfg_attr(feature = "unstable-testing", feature(test, non_ascii_idents))]
#[cfg(feature = "unstable-testing")]
extern crate test;
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_test;
#[macro_use]
mod macros;
mod test_annotations;
mod test_bytes;
mod test_de;
mod test_gen;
mod test_macros;
mod test_ser;
#[cfg(feature = "unstable-testing")]
mod compiletest;

View File

@ -1,3 +1,6 @@
#[macro_use]
extern crate serde_derive;
extern crate serde; extern crate serde;
use self::serde::{Serialize, Serializer, Deserialize, Deserializer}; use self::serde::{Serialize, Serializer, Deserialize, Deserializer};

View File

@ -1,4 +1,7 @@
extern crate serde;
use serde::bytes::{ByteBuf, Bytes}; use serde::bytes::{ByteBuf, Bytes};
extern crate serde_test;
use serde_test::{assert_tokens, assert_ser_tokens, assert_de_tokens, Token}; use serde_test::{assert_tokens, assert_ser_tokens, assert_de_tokens, Token};
#[test] #[test]

View File

@ -1,9 +1,13 @@
#[macro_use]
extern crate serde_derive;
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::net; use std::net;
use std::path::PathBuf; use std::path::PathBuf;
use std::time::Duration; use std::time::Duration;
use std::default::Default; use std::default::Default;
extern crate serde;
use serde::Deserialize; use serde::Deserialize;
extern crate fnv; extern crate fnv;
@ -17,6 +21,9 @@ use self::serde_test::{
assert_de_tokens_error, assert_de_tokens_error,
}; };
#[macro_use]
mod macros;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#[derive(Copy, Clone, PartialEq, Debug, Deserialize)] #[derive(Copy, Clone, PartialEq, Debug, Deserialize)]

View File

@ -2,6 +2,11 @@
// successfully when there are a variety of generics and non-(de)serializable // successfully when there are a variety of generics and non-(de)serializable
// types involved. // types involved.
#![cfg_attr(feature = "unstable-testing", feature(non_ascii_idents))]
#[macro_use]
extern crate serde_derive;
extern crate serde; extern crate serde;
use self::serde::ser::{Serialize, Serializer}; use self::serde::ser::{Serialize, Serializer};
use self::serde::de::{Deserialize, Deserializer}; use self::serde::de::{Deserialize, Deserializer};

View File

@ -1,3 +1,6 @@
#[macro_use]
extern crate serde_derive;
extern crate serde_test; extern crate serde_test;
use self::serde_test::{ use self::serde_test::{
Error, Error,

View File

@ -1,9 +1,14 @@
#[macro_use]
extern crate serde_derive;
use std::collections::{BTreeMap, HashMap, HashSet}; use std::collections::{BTreeMap, HashMap, HashSet};
use std::net; use std::net;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::str; use std::str;
use std::time::Duration; use std::time::Duration;
extern crate serde;
extern crate serde_test; extern crate serde_test;
use self::serde_test::{ use self::serde_test::{
Error, Error,
@ -18,6 +23,9 @@ use self::fnv::FnvHasher;
#[cfg(feature = "unstable")] #[cfg(feature = "unstable")]
use serde::ser::iterator; use serde::ser::iterator;
#[macro_use]
mod macros;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#[derive(Serialize)] #[derive(Serialize)]