Combine serde_json and tests into one crate

This commit is contained in:
David Tolnay 2017-04-11 21:10:13 -07:00
parent d37fc6cc7e
commit e11f3d11ed
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
37 changed files with 35 additions and 71 deletions

View File

@ -1,5 +1,31 @@
[workspace]
members = [
"json",
"json_tests",
]
[package]
name = "serde_json"
version = "0.9.10"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "A JSON serialization file format"
repository = "https://github.com/serde-rs/json"
documentation = "http://docs.serde.rs/serde_json/"
keywords = ["json", "serde", "serialization"]
categories = ["encoding"]
readme = "../README.md"
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
publish = false # this branch contains breaking changes
[badges]
travis-ci = { repository = "serde-rs/json" }
[features]
preserve_order = ["linked-hash-map"]
[dependencies]
serde = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
num-traits = "0.1.32"
linked-hash-map = { version = "0.4.1", optional = true }
itoa = "0.3"
dtoa = "0.4"
[dev-dependencies]
compiletest_rs = "0.2"
serde_bytes = { git = "https://github.com/serde-rs/bytes", branch = "1.0" }
serde_derive = { git = "https://github.com/serde-rs/serde", branch = "1.0" }

View File

@ -1,30 +0,0 @@
[package]
name = "serde_json"
version = "0.9.10"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "A JSON serialization file format"
repository = "https://github.com/serde-rs/json"
documentation = "http://docs.serde.rs/serde_json/"
keywords = ["json", "serde", "serialization"]
categories = ["encoding"]
readme = "../README.md"
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
publish = false # this branch contains breaking changes
[badges]
travis-ci = { repository = "serde-rs/json" }
[features]
preserve_order = ["linked-hash-map"]
[dependencies]
serde = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
num-traits = "0.1.32"
linked-hash-map = { version = "0.4.1", optional = true }
itoa = "0.3"
dtoa = "0.4"
[dev-dependencies]
serde_bytes = { git = "https://github.com/serde-rs/bytes", branch = "1.0" }
serde_derive = { git = "https://github.com/serde-rs/serde", branch = "1.0" }

View File

@ -1 +0,0 @@
../LICENSE-APACHE

View File

@ -1 +0,0 @@
../LICENSE-MIT

View File

@ -1 +0,0 @@
../README.md

View File

@ -1,18 +0,0 @@
[package]
name = "serde_json_tests"
version = "0.0.0"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
publish = false
[features]
trace-macros = []
unstable-testing = ["compiletest_rs"]
[dev-dependencies]
serde = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
serde_bytes = { git = "https://github.com/serde-rs/bytes", branch = "1.0" }
serde_json = { path = "../json" }
serde_derive = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
[dependencies]
compiletest_rs = { version = "0.2", optional = true }

View File

@ -1,5 +1,3 @@
#![cfg(feature = "unstable-testing")]
extern crate compiletest_rs as compiletest;
use std::env;
@ -8,7 +6,7 @@ fn run_mode(mode: &'static str) {
let mut config = compiletest::default_config();
config.mode = mode.parse().expect("invalid mode");
config.target_rustcflags = Some("-L deps/target/debug/deps".to_owned());
config.target_rustcflags = Some("-L tests/deps/target/debug/deps".to_owned());
if let Ok(name) = env::var("TESTNAME") {
config.filter = Some(name);
}

View File

@ -7,4 +7,4 @@ publish = false
[workspace]
[dependencies]
serde_json = { path = "../../json" }
serde_json = { path = "../.." }

View File

@ -28,25 +28,16 @@ if [ -n "${CLIPPY}" ]; then
exit
fi
cd "$DIR/json"
cargo clippy -- -Dclippy
cd "$DIR/json_tests"
cargo clippy -- -Dclippy
else
CHANNEL=nightly
cd "$DIR/json"
channel clean
channel build
channel build --features preserve_order
(cd "$DIR/tests/deps" && channel build)
channel test
cd "$DIR/json_tests/deps"
channel build
cd "$DIR/json_tests"
channel test --features unstable-testing
channel test --features preserve_order
for CHANNEL in stable 1.12.0 1.13.0 beta; do
cd "$DIR/json"
channel clean
channel build
channel build --features preserve_order