test: limit files scanned when searching for test completions
When gathering test completions original grep went over all files in repository recursively. In some cases it took way longer than required. This patch limits searches only to rootdir and test directories. References #1068 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ice0bba25f2fad62516226a7b045d12b6614bead5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1089 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
d62cdef0e3
commit
863d73d34b
@ -373,8 +373,11 @@ function timing_finish() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function create_test_list() {
|
function create_test_list() {
|
||||||
grep -rshI --include="*.sh" --exclude="autotest_common.sh" \
|
# First search all scripts in main SPDK directory.
|
||||||
-e "run_test " $rootdir | grep -v "#" \
|
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)
|
||||||
|
printf "%s" "$completion" | grep -v "#" \
|
||||||
| sed 's/^.*run_test/run_test/' | awk '{print $2}' | \
|
| sed 's/^.*run_test/run_test/' | awk '{print $2}' | \
|
||||||
sed 's/\"//g' | sort > $output_dir/all_tests.txt || true
|
sed 's/\"//g' | sort > $output_dir/all_tests.txt || true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user