[LTP] [PATCH] runltp: skipfile: skipped test cases should be visible as TCONF in results

Cyril Hrubis chrubis@suse.cz
Tue Dec 19 13:59:52 CET 2017


Hi!
> +    if [ -n "${SKIPFILE}" ]; then
> +        while read -r test_line; do
> +            case "${test_line}" in \#*) continue ;; esac
> +            if [ -n "${test_line}" ]; then
> +                # test_name is first column of each line in SKIPFILE
> +                test_name=$(echo ${test_line} | awk '{print $1}')
> +                sed -i "/\<${test_name}\>/c\\${test_name} exit 32;" alltests
> +            fi
> +        done < ${SKIPFILE}

This could be written in a simpler form:

	for test_name in $(awk '{print $1}' "$SKIPFILE"); do
		case "${test_name}" in \#*) continue;; esac
		sed -i "/\<${test_name}\>/c\\${test_name} exit 32;" alltests
	done


Other than that it looks fine.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list