From c5c58708db67d34fd4ffeef1362d21337dcbdd53 Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Mon, 9 May 2022 13:38:46 -0700 Subject: [PATCH] Fix format_compatible blowing away its TEST_TMPDIR (#9970) Summary: https://github.com/facebook/rocksdb/issues/9961 broke format_compatible check because of `make clean` referencing TEST_TMPDIR. The Makefile behavior seems reasonable to me, so here's a fix in check_format_compatible.sh Apparently I also included removing a redundant part of our CircleCI config. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9970 Test Plan: manual run: SHORT_TEST=1 ./tools/check_format_compatible.sh Reviewed By: riversand963 Differential Revision: D36258172 Pulled By: pdillinger fbshipit-source-id: d46507f04614e888b414ff23b88d040ae2b5c294 --- .circleci/config.yml | 2 +- tools/check_format_compatible.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b31a1e176..8ea70325a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -417,7 +417,7 @@ jobs: steps: - checkout # check out the code in the project directory - run: apt-get update -y && apt-get install -y libgflags-dev - - run: TEST_TMPDIR=/dev/shm && make V=1 -j8 unity_test + - run: make V=1 -j8 unity_test - run: make V=1 -j8 -k check-headers # could be moved to a different build - post-steps diff --git a/tools/check_format_compatible.sh b/tools/check_format_compatible.sh index ea07dd427..06e70d23c 100755 --- a/tools/check_format_compatible.sh +++ b/tools/check_format_compatible.sh @@ -63,6 +63,9 @@ scriptpath=`dirname ${BASH_SOURCE[0]}` test_dir=${TEST_TMPDIR:-"/tmp"}"/rocksdb_format_compatible_$USER" rm -rf ${test_dir:?} +# Prevent 'make clean' etc. from wiping out test_dir +export TEST_TMPDIR=$test_dir"/misc" + # For saving current version of scripts as we checkout different versions to test script_copy_dir=$test_dir"/script_copy" mkdir -p $script_copy_dir