Commit 98c951e8 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/abi: fix excluding "-pre" tags from ABI check



Commit below introduced nullglob to autotest:
(4641aa53)test/common: Provide {ext,null}glob by default in autotest suite

Without change in this commit, this resulted in not properly excluding tags
that end with "-pre". This resulted in comparing against pre-release SPDK version.
Since that version didn't yet have spdk-abi XML files for comparison,
and sanity check were missing in confirm_abi_deps() were missing.
All shared files comparison was skipped.

This commit accomplishes the following:
- Correctly excludes SPDK tags with "-pre"
- Checks if spdk-abi contains the directory for relevant SPDK version
- Checks if any shared objects were processed

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reported-by: default avatarJacek Kalwas <jacek.kalwas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20074

 (master)

(cherry picked from commit 650b8a2e)
Change-Id: I43036662e23743ceba4b340386cd0195c7143ffd
Signed-off-by: default avatarKrzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20132


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 1440f217
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ function check_header_filenames() {
}

function get_release_branch() {
	tag=$(git describe --tags --abbrev=0 --exclude=LTS --exclude=*-pre $1)
	tag=$(git describe --tags --abbrev=0 --exclude=LTS --exclude="*-pre" $1)
	branch="${tag:0:6}.x"
	echo "$branch"
}
@@ -104,6 +104,11 @@ function confirm_abi_deps() {
		git clone "https://github.com/spdk/spdk-abi.git" "$source_abi_dir"
	fi

	if [[ ! -d "$source_abi_dir/$release" ]]; then
		echo "Release (${release%.*}) does not exist in spdk-abi repository"
		return 1
	fi

	echo "* Running ${FUNCNAME[0]} against the latest (${release%.*}) release" >&2

	if ! hash abidiff; then
@@ -241,6 +246,10 @@ EOF
		processed_so=$((processed_so + 1))
	done
	rm -f $suppression_file
	if [[ "$processed_so" -eq 0 ]]; then
		echo "No shared objects were processed."
		return 1
	fi
	echo "Processed $processed_so objects."
	if [[ -z $user_abi_dir ]]; then
		rm -rf "$source_abi_dir"