From 908a999a72221ec81aa945ade4b6fe9a97702e74 Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Mon, 18 Oct 2021 10:59:55 -0700 Subject: [PATCH] Fix COMMIT_ID in regression_test.sh (#9047) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: https://github.com/facebook/rocksdb/issues/8031 broke internal tests. This should fix but also preserve the intended capability of getting git commit id when hg not used Pull Request resolved: https://github.com/facebook/rocksdb/pull/9047 Test Plan: already broken ¯\\_(ツ)_/¯ Reviewed By: zhichao-cao Differential Revision: D31732198 Pulled By: pdillinger fbshipit-source-id: 7dba8531ddca55a6de5e04978a1a1601aae4cee9 --- tools/regression_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/regression_test.sh b/tools/regression_test.sh index eca874a69..35ada1ad7 100755 --- a/tools/regression_test.sh +++ b/tools/regression_test.sh @@ -158,7 +158,7 @@ function init_arguments { current_time=$(date +"%F-%H:%M:%S") RESULT_PATH=${RESULT_PATH:-"$1/results/$current_time"} - COMMIT_ID=`git log | head -n1 | cut -c 8-` + COMMIT_ID=`hg id -i 2>/dev/null || git rev-parse HEAD 2>/dev/null || echo 'unknown'` SUMMARY_FILE="$RESULT_PATH/SUMMARY.csv" DB_PATH=${3:-"$1/db"}