mirror of
https://github.com/rust-lang/cargo
synced 2024-08-25 02:25:46 +00:00
Reorganize integration tests as one crate with many modules. Issue #4867.
This commit is contained in:
parent
b80af359e2
commit
c2ff988c9f
|
@ -80,7 +80,7 @@ features = [
|
|||
|
||||
[dev-dependencies]
|
||||
bufstream = "0.1"
|
||||
cargotest = { path = "tests/cargotest", version = "0.1" }
|
||||
cargotest = { path = "tests/testsuite/cargotest", version = "0.1" }
|
||||
filetime = "0.1"
|
||||
hamcrest = "=0.1.1"
|
||||
|
||||
|
@ -88,3 +88,7 @@ hamcrest = "=0.1.1"
|
|||
name = "cargo"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[test]]
|
||||
name = "testsuite"
|
||||
path = "tests/testsuite/lib.rs"
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::ChannelChanger;
|
||||
use cargotest::support::registry::{self, Package, alt_api_path};
|
||||
use cargotest::support::{paths, project, execs};
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{project, execs};
|
||||
use cargotest::support::registry::Package;
|
||||
use hamcrest::assert_that;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate hamcrest;
|
||||
extern crate cargotest;
|
||||
|
||||
use cargotest::support::{project, execs, main_file, basic_bin_manifest};
|
||||
use hamcrest::{assert_that};
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate cargo;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::str;
|
||||
|
||||
use cargo::util::process;
|
|
@ -1,9 +1,3 @@
|
|||
extern crate cargo;
|
||||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate tempdir;
|
||||
|
||||
use std::env;
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
|
@ -1,13 +1,10 @@
|
|||
extern crate bufstream;
|
||||
extern crate git2;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std;
|
||||
use std::collections::HashSet;
|
||||
use std::io::prelude::*;
|
||||
use std::net::TcpListener;
|
||||
use std::thread;
|
||||
|
||||
use git2;
|
||||
use bufstream::BufStream;
|
||||
use cargotest::support::paths;
|
||||
use cargotest::support::{project, execs};
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::env;
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs::File;
|
||||
|
||||
use cargotest::sleep_ms;
|
|
@ -1,7 +1,3 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::env;
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
|
@ -1,5 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
use cargotest::support::{project, execs, basic_bin_manifest};
|
||||
use hamcrest::{assert_that};
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::ChannelChanger;
|
||||
use cargotest::support::{project, execs};
|
||||
use hamcrest::assert_that;
|
|
@ -7,7 +7,7 @@ authors = ["Alex Crichton <alex@alexcrichton.com>"]
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
cargo = { path = "../.." }
|
||||
cargo = { path = "../../.." }
|
||||
filetime = "0.1"
|
||||
flate2 = "1.0"
|
||||
git2 = { version = "0.6", default-features = false }
|
|
@ -1,7 +1,3 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::str::FromStr;
|
||||
use std::fmt;
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate glob;
|
||||
|
||||
use cargotest::is_nightly;
|
||||
use cargotest::support::{execs, project};
|
||||
use cargotest::support::registry::Package;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate hamcrest;
|
||||
extern crate cargotest;
|
||||
|
||||
use std::env;
|
||||
|
||||
use cargotest::support::{git, project, execs, main_file, basic_bin_manifest};
|
|
@ -1,7 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate git2;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::{env, str};
|
||||
use std::fs::{self, File};
|
||||
use std::io::Write;
|
||||
|
@ -11,6 +7,8 @@ use std::thread;
|
|||
use std::sync::mpsc::channel;
|
||||
use std::time::Duration;
|
||||
|
||||
use git2;
|
||||
use cargotest;
|
||||
use cargotest::install::{has_installed_exe, cargo_home};
|
||||
use cargotest::support::git;
|
||||
use cargotest::support::registry::Package;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate hamcrest;
|
||||
extern crate cargotest;
|
||||
|
||||
use cargotest::support::{project, execs};
|
||||
use hamcrest::assert_that;
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargo::util::process;
|
||||
use cargotest::{is_nightly, rustc_host};
|
||||
use cargotest::support::{project, execs, basic_bin_manifest, cross_compile};
|
|
@ -1,9 +1,3 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate flate2;
|
||||
extern crate tar;
|
||||
|
||||
use std::fs::File;
|
||||
use std::path::PathBuf;
|
||||
use std::io::prelude::*;
|
|
@ -1,8 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate libc;
|
||||
#[cfg(windows)]
|
||||
extern crate winapi;
|
||||
|
||||
use std::fs;
|
||||
use std::io::{self, Read};
|
||||
use std::net::TcpListener;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{basic_bin_manifest, main_file, execs, project};
|
||||
use hamcrest::{assert_that, existing_file};
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
|
||||
use serde_json;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
|
@ -1,7 +1,4 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate cargo;
|
||||
|
||||
use cargotest;
|
||||
use std::str;
|
||||
use std::fs::{self, File};
|
||||
use std::io::Read;
|
|
@ -1,7 +1,3 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{project, execs};
|
||||
use hamcrest::assert_that;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate git2;
|
||||
extern crate hamcrest;
|
||||
|
||||
use git2;
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
use std::net::{TcpListener, TcpStream};
|
|
@ -1,8 +1,4 @@
|
|||
extern crate cargotest;
|
||||
extern crate cargo;
|
||||
extern crate tempdir;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest;
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
use std::env;
|
|
@ -1,7 +1,4 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest;
|
||||
use std::fs::{self, File, OpenOptions};
|
||||
use std::io::prelude::*;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::net::TcpListener;
|
||||
use std::thread;
|
||||
use std::process::Command;
|
82
tests/testsuite/lib.rs
Normal file
82
tests/testsuite/lib.rs
Normal file
|
@ -0,0 +1,82 @@
|
|||
extern crate cargo;
|
||||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate tempdir;
|
||||
extern crate bufstream;
|
||||
extern crate git2;
|
||||
extern crate glob;
|
||||
extern crate flate2;
|
||||
extern crate tar;
|
||||
extern crate libc;
|
||||
#[cfg(windows)]
|
||||
extern crate winapi;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
extern crate toml;
|
||||
extern crate url;
|
||||
|
||||
|
||||
mod alt_registry;
|
||||
mod bad_config;
|
||||
mod bad_manifest_path;
|
||||
mod bench;
|
||||
mod build_auth;
|
||||
mod build_lib;
|
||||
mod build;
|
||||
mod build_script_env;
|
||||
mod build_script;
|
||||
mod cargo_alias_config;
|
||||
mod cargo_features;
|
||||
//mod cargo;
|
||||
mod cfg;
|
||||
mod check;
|
||||
mod clean;
|
||||
mod concurrent;
|
||||
mod config;
|
||||
mod cross_compile;
|
||||
mod cross_publish;
|
||||
mod death;
|
||||
mod dep_info;
|
||||
mod directory;
|
||||
mod doc;
|
||||
mod features;
|
||||
mod fetch;
|
||||
mod freshness;
|
||||
mod generate_lockfile;
|
||||
mod git;
|
||||
mod init;
|
||||
mod install;
|
||||
mod jobserver;
|
||||
mod local_registry;
|
||||
mod lockfile_compat;
|
||||
mod login;
|
||||
mod metadata;
|
||||
mod net_config;
|
||||
mod new;
|
||||
mod overrides;
|
||||
mod package;
|
||||
mod patch;
|
||||
mod path;
|
||||
mod plugins;
|
||||
mod proc_macro;
|
||||
mod profiles;
|
||||
mod publish;
|
||||
mod read_manifest;
|
||||
mod registry;
|
||||
mod required_features;
|
||||
mod resolve;
|
||||
mod run;
|
||||
mod rustc;
|
||||
mod rustdocflags;
|
||||
mod rustdoc;
|
||||
mod rustflags;
|
||||
mod search;
|
||||
mod small_fd_limits;
|
||||
mod test;
|
||||
mod tool_paths;
|
||||
mod verify_project;
|
||||
mod version;
|
||||
mod warn_on_failure;
|
||||
mod workspaces;
|
|
@ -1,7 +1,3 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::git;
|
||||
use cargotest::support::registry::Package;
|
||||
use cargotest::support::{execs, project, lines_match};
|
|
@ -1,12 +1,7 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate cargo;
|
||||
extern crate hamcrest;
|
||||
extern crate toml;
|
||||
|
||||
use std::io::prelude::*;
|
||||
use std::fs::{self, File};
|
||||
|
||||
use toml;
|
||||
use cargotest::{ChannelChanger, cargo_process};
|
||||
use cargotest::support::execs;
|
||||
use cargotest::support::registry::registry;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use hamcrest::assert_that;
|
||||
use cargotest::support::registry::Package;
|
||||
use cargotest::support::{project, execs, basic_bin_manifest, basic_lib_manifest, main_file};
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{project, execs};
|
||||
use hamcrest::assert_that;
|
||||
|
|
@ -1,12 +1,8 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate tempdir;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
use std::env;
|
||||
|
||||
use cargotest;
|
||||
use cargo::util::ProcessBuilder;
|
||||
use cargotest::process;
|
||||
use cargotest::support::{execs, paths};
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::git;
|
||||
use cargotest::support::paths;
|
||||
use cargotest::support::registry::Package;
|
|
@ -1,14 +1,9 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate flate2;
|
||||
extern crate git2;
|
||||
extern crate hamcrest;
|
||||
extern crate tar;
|
||||
|
||||
use std;
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use git2;
|
||||
use cargotest::{cargo_process, process, ChannelChanger};
|
||||
use cargotest::support::{project, execs, paths, git, path2url, cargo_exe, registry};
|
||||
use cargotest::support::registry::Package;
|
|
@ -1,11 +1,7 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate toml;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::{Read, Write};
|
||||
|
||||
use toml;
|
||||
use cargotest::support::git;
|
||||
use cargotest::support::paths;
|
||||
use cargotest::support::registry::Package;
|
|
@ -1,12 +1,8 @@
|
|||
extern crate cargo;
|
||||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
|
||||
use cargo::util::process;
|
||||
use cargotest;
|
||||
use cargotest::sleep_ms;
|
||||
use cargotest::support::paths::{self, CargoPathExt};
|
||||
use cargotest::support::{project, execs, main_file};
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs;
|
||||
use std::env;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::is_nightly;
|
||||
use cargotest::support::{project, execs};
|
||||
use hamcrest::assert_that;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::env;
|
||||
|
||||
use cargotest::is_nightly;
|
|
@ -1,8 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate flate2;
|
||||
extern crate hamcrest;
|
||||
extern crate tar;
|
||||
|
||||
use std::io::prelude::*;
|
||||
use std::fs::{self, File};
|
||||
use std::io::SeekFrom;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{project, execs, main_file, basic_bin_manifest};
|
||||
use hamcrest::{assert_that};
|
||||
|
|
@ -1,8 +1,3 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate url;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
use std::path::PathBuf;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::is_nightly;
|
||||
use cargotest::install::{cargo_home, has_installed_exe};
|
||||
use cargotest::support::{project, execs};
|
|
@ -1,8 +1,5 @@
|
|||
#![deny(warnings)]
|
||||
|
||||
extern crate hamcrest;
|
||||
extern crate cargo;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use hamcrest::{assert_that, equal_to, contains, not};
|
|
@ -1,7 +1,3 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargo::util::paths::dylib_path_envvar;
|
||||
use cargotest::support::{project, execs, path2url};
|
||||
use hamcrest::{assert_that, existing_file};
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{execs, project};
|
||||
use hamcrest::assert_that;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{execs, project};
|
||||
use hamcrest::{assert_that};
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{project, execs};
|
||||
use hamcrest::assert_that;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::io::Write;
|
||||
use std::fs::{self, File};
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
extern crate url;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::prelude::*;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use cargo::util::ProcessBuilder;
|
||||
use cargotest;
|
||||
use cargotest::support::execs;
|
||||
use cargotest::support::git::repo;
|
||||
use cargotest::support::paths;
|
|
@ -1,13 +1,9 @@
|
|||
extern crate cargotest;
|
||||
extern crate git2;
|
||||
extern crate hamcrest;
|
||||
extern crate url;
|
||||
|
||||
use std::env;
|
||||
use std::ffi::OsStr;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
use git2;
|
||||
use cargotest::support::{execs, project};
|
||||
use cargotest::support::registry::Package;
|
||||
use cargotest::support::paths;
|
|
@ -1,11 +1,8 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::str;
|
||||
|
||||
use cargo;
|
||||
use cargotest::{sleep_ms, is_nightly, rustc_host};
|
||||
use cargotest::support::{project, execs, basic_bin_manifest, basic_lib_manifest, cargo_exe};
|
||||
use cargotest::support::paths::CargoPathExt;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::rustc_host;
|
||||
use cargotest::support::{path2url, project, execs};
|
||||
use hamcrest::assert_that;
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{project, execs, main_file, basic_bin_manifest};
|
||||
use hamcrest::{assert_that};
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
extern crate cargo;
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargo;
|
||||
use cargotest::support::{project, execs};
|
||||
use hamcrest::assert_that;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use cargotest::support::{project, execs, Project};
|
||||
use cargotest::support::registry::Package;
|
||||
use hamcrest::assert_that;
|
|
@ -1,7 +1,3 @@
|
|||
#[macro_use]
|
||||
extern crate cargotest;
|
||||
extern crate hamcrest;
|
||||
|
||||
use std::env;
|
||||
use std::fs::{self, File};
|
||||
use std::io::{Read, Write};
|
Loading…
Reference in a new issue