From 37887b60cae8b8d5ea77fee38a08c525ff4fbbcf Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 26 Apr 2019 02:04:25 -0700 Subject: [PATCH] test/rocksdb: add env variables to skip parts of test When debugging issues or running local tests, it is nice to skip rebuilding all of the db_bench tool or running mkfs on the underlying SPDK device. So add SKIP_GIT_CLEAN and SKIP_MKFS checks which allow the test caller to skip these steps. Signed-off-by: Jim Harris Change-Id: I4d3f739aaa908a816aacf89d3fed0985493b7f59 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452261 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu Reviewed-by: Ziye Yang Reviewed-by: Darek Stojaczyk --- test/blobfs/rocksdb/rocksdb.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/blobfs/rocksdb/rocksdb.sh b/test/blobfs/rocksdb/rocksdb.sh index b5b9af8ce..6510ae0fd 100755 --- a/test/blobfs/rocksdb/rocksdb.sh +++ b/test/blobfs/rocksdb/rocksdb.sh @@ -40,7 +40,9 @@ timing_enter rocksdb timing_enter db_bench_build pushd $DB_BENCH_DIR -git clean -x -f -d +if [ -z "$SKIP_GIT_CLEAN" ]; then + git clean -x -f -d +fi $MAKE db_bench $MAKEFLAGS $MAKECONFIG DEBUG_LEVEL=0 SPDK_DIR=$rootdir popd @@ -50,9 +52,11 @@ $rootdir/scripts/gen_nvme.sh > $ROCKSDB_CONF trap 'run_bsdump; rm -f $ROCKSDB_CONF; exit 1' SIGINT SIGTERM EXIT -timing_enter mkfs -$rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1 -timing_exit mkfs +if [ -z "$SKIP_MKFS" ]; then + timing_enter mkfs + $rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1 + timing_exit mkfs +fi mkdir -p $output_dir/rocksdb RESULTS_DIR=$output_dir/rocksdb