use branch names in format compatibility test
Summary: We had to go back and update the g++ path for 4.4.fb-4.8.fb. So the path is now fixed on the branches, but can't be fixed on the tags since they're immutable. By making format compatibility tests use branch names (when available), backported fixes like this will be used without having to re-release. Also removed v1.5.7 and v2.1 because make fails. Test Plan: $ build_tools/rocksdb-lego-determinator run_format_compatible Reviewers: sdong, lightmark, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D59355
This commit is contained in:
parent
edc764e91b
commit
5091dfc1ed
@ -4,7 +4,7 @@
|
||||
# ./ldb needs to be avaible to be executed.
|
||||
#
|
||||
# Usage: <SCRIPT> [checkout]
|
||||
# `checkout` can be a tag, commit or branch name. Will build using it and check DBs generated by all previous tags can be opened by it.
|
||||
# `checkout` can be a tag, commit or branch name. Will build using it and check DBs generated by all previous branches (or tags for very old versions without branch) can be opened by it.
|
||||
# Return value 0 means all regression tests pass. 1 if not pass.
|
||||
|
||||
scriptpath=`dirname $BASH_SOURCE`
|
||||
@ -41,10 +41,8 @@ with open('${input_data[$i]}', 'w') as f:
|
||||
EOF
|
||||
done
|
||||
|
||||
# v2.1 or older doesn't pass the debug build but OK with release build
|
||||
declare -a need_release_tags=("v1.5.7" "v2.1")
|
||||
declare -a tags=("v2.5" "v2.4" "v2.3" "v2.2" "v2.8" "v3.0" "v3.1" "v3.2" "v3.3" "v3.4" "rocksdb-3.5.1" "rocksdb-3.6.2" "rocksdb-3.7" "rocksdb-3.8" "rocksdb-3.9" "v3.10" "v3.11" "v3.12.1" "v3.13.1" "v4.0" "v4.1" "v4.2" "v4.3" "v4.3.1" "v4.4")
|
||||
declare -a forward_compatible_tags=("v3.10" "v3.11" "v3.12.1" "v3.13.1" "v4.0" "v4.1" "v4.2" "v4.3.1" "v4.4")
|
||||
declare -a checkout_objs=("v2.2" "v2.3" "v2.4" "v2.5" "2.8.fb" "3.0.fb" "3.1.fb" "3.2.fb" "3.3.fb" "3.4.fb" "3.5.fb" "3.6.fb" "3.7.fb" "3.8.fb" "3.9.fb" "3.10.fb" "3.11.fb" "3.12.fb" "3.13.fb" "4.0.fb" "4.1.fb" "4.2.fb" "4.3.fb" "4.4.fb" "4.5.fb" "4.6.fb" "4.7.fb" "4.8.fb")
|
||||
declare -a forward_compatible_checkout_objs=("3.10.fb" "3.11.fb" "3.12.fb" "3.13.fb" "4.0.fb" "4.1.fb" "4.2.fb" "4.3.fb" "4.4.fb")
|
||||
|
||||
generate_db()
|
||||
{
|
||||
@ -69,13 +67,13 @@ compare_db()
|
||||
}
|
||||
|
||||
set -e
|
||||
for tag in "${tags[@]}" "${need_release_tags[@]}"
|
||||
for checkout_obj in "${checkout_objs[@]}"
|
||||
do
|
||||
echo == Generating DB from "$tag" ...
|
||||
git checkout $tag
|
||||
echo == Generating DB from "$checkout_obj" ...
|
||||
git checkout $checkout_obj
|
||||
make clean
|
||||
make ldb -j32
|
||||
generate_db $input_data_path $test_dir/$tag
|
||||
generate_db $input_data_path $test_dir/$checkout_obj
|
||||
done
|
||||
|
||||
checkout_flag=${1:-"master"}
|
||||
@ -88,28 +86,19 @@ compare_base_db_dir=$test_dir"/base_db_dir"
|
||||
echo == Generate compare base DB to $compare_base_db_dir
|
||||
generate_db $input_data_path $compare_base_db_dir
|
||||
|
||||
for tag in "${tags[@]}"
|
||||
for checkout_obj in "${checkout_objs[@]}"
|
||||
do
|
||||
echo == Opening DB from "$tag" using debug build of $checkout_flag ...
|
||||
compare_db $test_dir/$tag $compare_base_db_dir db_dump.txt
|
||||
echo == Opening DB from "$checkout_obj" using debug build of $checkout_flag ...
|
||||
compare_db $test_dir/$checkout_obj $compare_base_db_dir db_dump.txt
|
||||
done
|
||||
|
||||
echo == Building $checkout_flag release
|
||||
git checkout $checkout_flag
|
||||
make release
|
||||
for tag in "${need_release_tags[@]}"
|
||||
for checkout_obj in "${forward_compatible_checkout_objs[@]}"
|
||||
do
|
||||
echo == Opening DB generated by "$tag" using release build of $checkout_flag ...
|
||||
compare_db $test_dir/$tag $compare_base_db_dir db_dump.txt
|
||||
done
|
||||
|
||||
for tag in "${forward_compatible_tags[@]}"
|
||||
do
|
||||
echo == Build "$tag" and try to open DB generated using $checkout_flag...
|
||||
git checkout $tag
|
||||
echo == Build "$checkout_obj" and try to open DB generated using $checkout_flag...
|
||||
git checkout $checkout_obj
|
||||
make clean
|
||||
make ldb -j32
|
||||
compare_db $test_dir/$tag $compare_base_db_dir forward_${tag}_dump.txt
|
||||
compare_db $test_dir/$checkout_obj $compare_base_db_dir forward_${checkout_obj}_dump.txt
|
||||
done
|
||||
|
||||
echo ==== Compatibility Test PASSED ====
|
||||
|
Loading…
Reference in New Issue
Block a user