diff --git a/.evergreen/scripts/abi-compliance-check-test.sh b/.evergreen/scripts/abi-compliance-check-test.sh index 1f706c2fef..144954a72a 100755 --- a/.evergreen/scripts/abi-compliance-check-test.sh +++ b/.evergreen/scripts/abi-compliance-check-test.sh @@ -37,6 +37,14 @@ if true; then ../install/old/include/ + + /v_noabi/bsoncxx/enums/ + /v_noabi/bsoncxx/config/ + /v_noabi/mongocxx/config/ + /v1/detail/prelude.hpp + /v1/detail/postlude.hpp + + DOC cat >new.xml < -DOC - - { - cat < /v_noabi/bsoncxx/enums/ /v_noabi/bsoncxx/config/ @@ -64,12 +68,7 @@ DOC /v1/detail/postlude.hpp - - detail - - DOC - } | tee -a old.xml new.xml >/dev/null tee cxx-abi/old.xml cxx-noabi/old.xml /dev/null tee cxx-abi/new.xml cxx-noabi/new.xml /dev/null @@ -87,13 +86,11 @@ if true; then /v_noabi/ -DOC - cat >>cxx-noabi/old.xml < - ../install/old/include/bsoncxx/v_noabi - ../install/old/include/mongocxx/v_noabi - + + bsoncxx::detail + mongocxx::detail + DOC cat >>cxx-abi/new.xml < /v_noabi/ + + + bsoncxx::detail + mongocxx::detail + +DOC + + cat >>cxx-noabi/old.xml < + ../install/old/include/bsoncxx/v_noabi + ../install/old/include/mongocxx/v_noabi + + + + bsoncxx::detail + mongocxx::detail + bsoncxx::v1 + mongocxx::v1 + DOC cat >>cxx-noabi/new.xml < + + + bsoncxx::detail + mongocxx::detail + bsoncxx::v1 + mongocxx::v1 + DOC fi +args=( + -lib mongo-cxx-driver + -old old.xml + -new new.xml +) + # Allow task to upload the HTML report despite failed status. echo "Generating stable ABI report..." pushd cxx-abi declare ret -abi-compliance-checker -lib mongo-cxx-driver -old old.xml -new new.xml 2>&1 && ret="$?" || ret="$?" +abi-compliance-checker "${args[@]}" 2>&1 && ret="$?" || ret="$?" if [[ "${ret:?}" -gt 1 ]]; then declare status status='{"status":"failed", "type":"test", "should_continue":true, "desc":"abi-compliance-checker emitted one or more errors"}' @@ -136,7 +165,7 @@ echo "Generating stable ABI report... done." echo "Generating unstable ABI report..." pushd cxx-noabi declare ret -abi-compliance-checker -lib mongo-cxx-driver -old old.xml -new new.xml 2>&1 && ret="$?" || ret="$?" +abi-compliance-checker "${args[@]}" 2>&1 && ret="$?" || ret="$?" if [[ "${ret:?}" -gt 1 ]]; then declare status status='{"status":"failed", "type":"test", "should_continue":true, "desc":"abi-compliance-checker emitted one or more errors"}'