diff options
author | Sevinj Aghayeva <sevinj.aghayeva@gmail.com> | 2022-06-09 12:29:24 -0400 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-06-14 15:44:52 +0200 |
commit | f858447fe43f16038cf45565d0ac761a703fd645 (patch) | |
tree | 2c0cefd85e456b64a72a47889028231126e9ca18 | |
parent | a38c40340b3af52b7536acf18bfde25c1a66b43c (diff) | |
download | mbuto-f858447fe43f16038cf45565d0ac761a703fd645.tar mbuto-f858447fe43f16038cf45565d0ac761a703fd645.tar.gz mbuto-f858447fe43f16038cf45565d0ac761a703fd645.tar.bz2 mbuto-f858447fe43f16038cf45565d0ac761a703fd645.tar.lz mbuto-f858447fe43f16038cf45565d0ac761a703fd645.tar.xz mbuto-f858447fe43f16038cf45565d0ac761a703fd645.tar.zst mbuto-f858447fe43f16038cf45565d0ac761a703fd645.zip |
mbuto: Add -L suboption to kselftests for listing available collections
Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
[sbrivio: pass output to 'fmt -t' for readability]
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-x | mbuto | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -209,6 +209,14 @@ profile_kselftests() { __testpath="./tools/testing/selftests/" __makefile="${__testpath}Makefile" __colls= + + if [ -n "${SUBOPT_list+x}" ]; then + __colls=$("${AWK}" '/^TARGETS \+= / {print $3}' ${__makefile} | "${TR}" '\n' ' ') + printf "Available collections:\n " + echo "${__colls}" | "${FMT}" -t + exit 0 + fi + for __c in ${SUBOPT_collection}; do if ! ${GREP} -q "^TARGETS += ${__c}$" ${__makefile}; then notice "WARNING: collection ${__c} doesn't exist" @@ -316,7 +324,7 @@ profile_kselftests() { ### Helpers #################################################################### # List of tools used here, assigned to uppercase variable names -TOOLS="awk basename bc cat cd chmod cp cpio depmod diff dirname du file find +TOOLS="awk basename bc cat cd chmod cp cpio depmod diff dirname du file find fmt grep egrep gzip ldconfig ldd ln ls make mkdir mknod mktemp modprobe mv printf readlink realpath rm rmdir sed seq sleep sort strip sync tr umount uname wget which" @@ -458,6 +466,7 @@ list_join() { SUBOPTS=' kselftests C collection 2 Select a collection of kernel tests kselftests T test 2 Select a test from a collection + kselftests L list 1 List available collections ' subopts_profile= |