# Crate cargo_test_support

source ·
Expand description

## Cargo test support.

See https://rust-lang.github.io/cargo/contrib/ for a guide on writing tests.

## Modules

- compare
  Routines for comparing and diffing output.
- containers
  Support for testing using Docker containers.
- cross_compile
  Support for cross-compile tests with the `--target` flag.
- diff 🔒
  A simple Myers diff implementation.
- git
- install
- paths
- prelude
- publish
- registry
- tools
  Common executables that can be reused by various tests.

## Macros

- curr_dir
- t

## Structs

- Execs
- FileBuilder 🔒
- Project
  A cargo project to run tests against.
- ProjectBuilder
  Create a project to run tests against
- RawOutput
  This is the raw output from the process.
- RustcInfo 🔒
- SymlinkBuilder 🔒

## Traits

- ArgLine
  Add a list of arguments as a line
- CargoCommand
  Test the cargo command
- ChannelChanger
  Enable nightly features for testing
- TestEnv
  Establish a process’s test environment

## Functions

- _process 🔒
- basic_bin_manifest
- basic_lib_manifest
- basic_manifest
- cargo_exe
- cargo_process
- execs
- git_process
- is_coarse_mtime
  Returns `true` if the local filesystem has low-resolution mtimes.
- is_nightly
- main_file
- no_such_file_err_msg
  The error message for ENOENT.
- panic_error
- path2url
- process
- project
- project_in
- project_in_home
- retry
  Helper to retry a function `n` times.
- rustc_host
  The rustc host such as `x86_64-unknown-linux-gnu`.
- rustc_host_env
  The host triple suitable for use in a cargo environment variable (uppercased).
- rustc_info 🔒
- sleep_ms
- slow_cpu_multiplier
  Some CI setups are much slower then the equipment used by Cargo itself. Architectures that do not have a modern processor, hardware emulation, etc. This provides a way for those setups to increase the cut off for all the time based test.
- symlink_supported
- thread_wait_timeout
  Helper that waits for a thread to finish, up to `n` tenths of a second.
- threaded_timeout
  Helper that runs some function, and waits up to `n` tenths of a second for it to finish.
- wrapped_clippy_driver
  A wrapper around `rustc` instead of calling `clippy`.

## Attribute Macros

- cargo_test