test/autotest: Fix grep in create_test_list()

Fixing grep because in freebsd grep interprets --exclude,include differently
which causes match on run_test()

Fixes: #2479

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: I3ab5daa7cd49d2bc8f1af6f7517f9b74b2dd88de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12392
Reviewed-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
Jaroslaw Chachulski 2022-04-27 07:18:44 -04:00 committed by Tomasz Zawadzki
parent d11edb7ac8
commit 2365ebd5ba

View File

@ -629,7 +629,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+=$(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