diff options
| -rwxr-xr-x | hack/lib/golang.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 9cf3faa47..23a61c007 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -389,20 +389,31 @@ kubeedge::golang::get_edge_test_dirs() { ) } +kubeedge::golang::get_pkg_test_dirs() { + cd ${KUBEEDGE_ROOT} + findDirs=$(find -L ./pkg \ + -name '*_test.go' -print | xargs -n1 dirname | uniq) + dirArray=(${findDirs// /}) + echo "${dirArray[@]}" +} + read -ra KUBEEDGE_CLOUD_TESTCASES <<< "$(kubeedge::golang::get_cloud_test_dirs)" read -ra KUBEEDGE_EDGE_TESTCASES <<< "$(kubeedge::golang::get_edge_test_dirs)" read -ra KUBEEDGE_KEADM_TESTCASES <<< "$(kubeedge::golang::get_keadm_test_dirs)" +read -ra KUBEEDGE_PKG_TESTCASES <<< "$(kubeedge::golang::get_pkg_test_dirs)" readonly KUBEEDGE_ALL_TESTCASES=( ${KUBEEDGE_CLOUD_TESTCASES[@]} ${KUBEEDGE_EDGE_TESTCASES[@]} ${KUBEEDGE_KEADM_TESTCASES[@]} + ${KUBEEDGE_PKG_TESTCASES[@]} ) ALL_COMPONENTS_AND_GETTESTDIRS_FUNCTIONS=( cloud::::kubeedge::golang::get_cloud_test_dirs edge::::kubeedge::golang::get_edge_test_dirs keadm::::kubeedge::golang::get_keadm_test_dirs + pkg::::kubeedge::golang::get_pkg_test_dirs ) kubeedge::golang::get_testdirs_by_component() { |
