Commit 8a810f5f authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test/common: Separate grep runs with a newline while creating a tests list



Without this, the second run of grep adds output directly behind the
last line of the first one. This results in the last test (from the
first run) always being filtered out from the list by the next sed
call.

Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Change-Id: I1aa5d2acfc28cccdee1464462b0350f0cbc346c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14756


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 96679a29
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -661,7 +661,7 @@ function create_test_list() {
	# First search all scripts in main SPDK directory.
	completion=$(grep -shI -d skip --include="*.sh" -e "run_test " $rootdir/*)
	# Follow up with search in test directory recursively.
	completion+=$(grep -rshI --include="*.sh" --exclude="*autotest_common.sh" -e "run_test " $rootdir/test)
	completion+=$'\n'$(grep -rshI --include="*.sh" --exclude="*autotest_common.sh" -e "run_test " $rootdir/test)
	printf "%s" "$completion" | grep -v "#" \
		| sed 's/^.*run_test/run_test/' | awk '{print $2}' \
		| sed 's/\"//g' | sort > $output_dir/all_tests.txt || true