File: mod.rs

package info (click to toggle)
rust-cargo 0.91.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 16,860 kB
  • sloc: javascript: 426; sh: 315; python: 88; xml: 21; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::path::PathBuf;

use cargo_test_support::{ArgLineCommandExt, Execs, execs, process};

pub mod cross_compile;
pub mod ext;
pub mod tools;

/// Run `cargo $arg_line`, see [`Execs`]
pub fn cargo_process(arg_line: &str) -> Execs {
    let cargo = cargo_exe();
    let mut p = process(&cargo);
    p.env("CARGO", cargo);
    p.arg_line(arg_line);
    execs().with_process_builder(p)
}

/// Path to the cargo binary
pub fn cargo_exe() -> PathBuf {
    snapbox::cmd::cargo_bin!("cargo").to_path_buf()
}