Skip to content

Commit

Permalink
fix test script and address comment
Browse files Browse the repository at this point in the history
Signed-off-by: tabokie <xy.tao@outlook.com>
  • Loading branch information
tabokie committed Jun 13, 2022
1 parent 67df62a commit e05ad7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 3 additions & 0 deletions components/tikv_alloc/src/lib.rs
Expand Up @@ -134,6 +134,9 @@ mod runner {
extern crate test;
use test::*;

/// Test cases with name <name>_where_<ENV_VAR_NAME> will be checked for
/// whether the environment variable is set. Cases are ignored if its
/// depending variable is unset.
pub fn run_env_conditional_tests(cases: &[&TestDescAndFn]) {
let cases: Vec<_> = cases
.iter()
Expand Down
10 changes: 3 additions & 7 deletions scripts/test-all
Expand Up @@ -13,17 +13,13 @@ if [[ -z $MAKEFILE_RUN ]] ; then
fi

./scripts/test "$@" -- --nocapture
# The special Linux case below is testing the mem-profiling
# features in tikv_alloc, which are marked #[ignore] since
# they require special compile-time and run-time setup
# Fortunately rebuilding with the mem-profiling feature will only
# rebuild starting at jemalloc-sys.
# Re-run tests that requires specific environment variables.
if [[ "$(uname)" == "Linux" ]]; then
export MALLOC_CONF=prof:true
./scripts/test "$@" -- --nocapture
./scripts/test "$@" -- where_MALLOC_CONF --nocapture
fi

if [[ "$(uname)" = "Linux" ]]; then
EXTRA_CARGO_ARGS="" ./scripts/test --message-format=json-render-diagnostics -q --no-run -- --nocapture |
python scripts/check-bins.py --features "${TIKV_ENABLE_FEATURES}" --check-tests
python scripts/check-bins.py --features "${TIKV_ENABLE_FEATURES}" --check-tests
fi

0 comments on commit e05ad7e

Please sign in to comment.