Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/cargo-test-support/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use some of the helper functions in this file to interact with the repository.
*/

use crate::{path2url, project, Project, ProjectBuilder};
use git2;
use std::fs::{self, File};
use std::io::prelude::*;
use std::path::{Path, PathBuf};
Expand Down
2 changes: 0 additions & 2 deletions crates/cargo-test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ use std::str;
use std::time::{self, Duration};
use std::usize;

use cargo;
use cargo::util::{is_ci, CargoResult, ProcessBuilder, ProcessError, Rustc};
use filetime;
use serde_json::{self, Value};
use url::Url;

Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/cargo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::io::prelude::*;
use std::path::{Path, PathBuf};
use std::str;

use cargo;
use cargo_test_support::cargo_process;
use cargo_test_support::paths::{self, CargoPathExt};
use cargo_test_support::registry::Package;
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use cargo_test_support::git;
use cargo_test_support::install::{assert_has_installed_exe, cargo_home};
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, execs, project, slow_cpu_multiplier};
use git2;

fn pkg(name: &str, vers: &str) {
Package::new(name, vers)
Expand Down
12 changes: 6 additions & 6 deletions tests/testsuite/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ fn simple_cross() {

let target = cross_compile::alternate();
p.cargo("build -v --target").arg(&target).run();
assert!(p.target_bin(&target, "foo").is_file());
assert!(p.target_bin(target, "foo").is_file());

if cross_compile::can_run_on_host() {
p.process(&p.target_bin(&target, "foo")).run();
p.process(&p.target_bin(target, "foo")).run();
}
}

Expand Down Expand Up @@ -110,10 +110,10 @@ fn simple_cross_config() {

let target = cross_compile::alternate();
p.cargo("build -v").run();
assert!(p.target_bin(&target, "foo").is_file());
assert!(p.target_bin(target, "foo").is_file());

if cross_compile::can_run_on_host() {
p.process(&p.target_bin(&target, "foo")).run();
p.process(&p.target_bin(target, "foo")).run();
}
}

Expand Down Expand Up @@ -146,10 +146,10 @@ fn simple_deps() {

let target = cross_compile::alternate();
p.cargo("build --target").arg(&target).run();
assert!(p.target_bin(&target, "foo").is_file());
assert!(p.target_bin(target, "foo").is_file());

if cross_compile::can_run_on_host() {
p.process(&p.target_bin(&target, "foo")).run();
p.process(&p.target_bin(target, "foo")).run();
}
}

Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/git.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Tests for git support.

use git2;
use std::env;
use std::fs::{self, File};
use std::io::prelude::*;
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/git_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use std::thread;

use cargo_test_support::paths;
use cargo_test_support::{basic_manifest, project};
use git2;

// Tests that HTTP auth is offered from `credential.helper`.
#[cargo_test]
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/git_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use cargo_test_support::git;
use cargo_test_support::paths;
use cargo_test_support::project;
use cargo_test_support::registry::Package;
use git2;

use url::Url;

Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/init.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Tests for the `cargo init` command.

use cargo_test_support;
use std::env;
use std::fs::{self, File};
use std::io::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use std::fs::{self, File, OpenOptions};
use std::io::prelude::*;

use git2;

use cargo_test_support::cross_compile;
use cargo_test_support::git;
use cargo_test_support::install::{
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use cargo::util::config::Config;
use cargo_test_support::install::cargo_home;
use cargo_test_support::registry::{self, registry_url};
use cargo_test_support::{cargo_process, paths, t};
use toml;

const TOKEN: &str = "test-token";
const TOKEN2: &str = "test-token2";
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/metabuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cargo_test_support::{
basic_lib_manifest, basic_manifest, is_coarse_mtime, project, registry::Package, rustc_host,
Project,
};
use serde_json;

use std::str;

#[cargo_test]
Expand Down
7 changes: 2 additions & 5 deletions tests/testsuite/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ use cargo_test_support::registry::{self, api_path, registry_url};
fn setup(name: &str, content: Option<&str>) {
let dir = api_path().join(format!("api/v1/crates/{}", name));
dir.mkdir_p();
match content {
Some(body) => {
fs::write(dir.join("owners"), body).unwrap();
}
None => {}
if let Some(body) = content {
fs::write(dir.join("owners"), body).unwrap();
}
}

Expand Down
2 changes: 0 additions & 2 deletions tests/testsuite/package.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Tests for the `cargo package` command.

use std;
use std::fs::{read_to_string, File};
use std::io::prelude::*;
use std::path::Path;
Expand All @@ -11,7 +10,6 @@ use cargo_test_support::{
basic_manifest, cargo_process, git, path2url, paths, project, publish::validate_crate_contents,
registry, symlink_supported, t,
};
use git2;

#[cargo_test]
fn simple() {
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use cargo_test_support::git;
use cargo_test_support::paths;
use cargo_test_support::registry::Package;
use cargo_test_support::{basic_manifest, project, t};
use toml;

#[cargo_test]
fn replace() {
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/publish_lockfile.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Tests for including `Cargo.lock` when publishing/packaging.

use std;
use std::fs::File;

use cargo_test_support::registry::Package;
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Tests for the `cargo test` command.

use cargo;
use cargo_test_support::paths::CargoPathExt;
use cargo_test_support::registry::Package;
use cargo_test_support::{
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/version.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Tests for displaying the cargo version.

use cargo;
use cargo_test_support::project;

#[cargo_test]
Expand Down