about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorYacin Tmimi <yacintmimi@gmail.com>2021-11-27 17:14:15 -0500
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2021-11-27 17:36:18 -0600
commita21f1b6c2a5734f39a1efe3fa84d6475843d14fe (patch)
tree8142f1b04d7ed510ae84ec838b0546cf2abca992 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent67fd9ec3002d269c272f68fa0e34a1cb2ca5fd08 (diff)
downloadrust-a21f1b6c2a5734f39a1efe3fa84d6475843d14fe.tar.gz
rust-a21f1b6c2a5734f39a1efe3fa84d6475843d14fe.zip
Conditionally compile tests based on CFG_RELEASE_CHANNEL env var
Adds the ``nightly_only_test`` and ``stable_only_test`` attribute macros
that prevent or allow certain tests to compile on nightly and stable
respectively. This is achieved through conditionally outputting the
tests TokenStream.

If CFG_RELEASE_CHANNEL is not set, it's assumed that we're running in a
nightly environment.

To mark a test as nightly only:

    #[nightly_only_test]
    #[test]
    fn only_run_on_nightly() {
        ...
    }

To mark a test a stable only:

    #[stable_only_test]
    #[test]
    fn only_run_on_stable() {
        ...
    }
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions