[LTP] [PATCH] make: Add make check target + run.sh

Petr Vorel pvorel@suse.cz
Thu Oct 17 11:06:30 CEST 2019


Hi,

> +check: | $(MAKE_TARGETS)
> +	./run.sh
> diff --git a/lib/newlib_tests/run.sh b/lib/newlib_tests/run.sh
> new file mode 100755
> index 000000000..566454106
> --- /dev/null
> +++ b/lib/newlib_tests/run.sh
> @@ -0,0 +1,17 @@
> +#!/bin/sh

I guess, I should set PATH here to cwd and to testcases/lib/ (remove it from
lib/newlib_tests/shell/test_timeout_mul.sh). Probably some setup.sh loaded by
each test would be good, so all tests gets correct PATH)
> +
> +# blacklist directory content which is not a test
> +FILTER_OUT_FILES="$(basename $0) *.c config[0-9]* Makefile test_kconfig"
Instead of blacklisting tests, I should use approach from
lib/newlib_tests/shell/test_timeout_mul.sh: specify test and it's expected exit
code. Then it'd be possible to have also results which TBROK.
+ maybe disable color for tests and use colors for this comparison of expected
output.
> +
> +grep_pattern=
> +for i in $(echo $FILTER_OUT_FILES); do
> +	grep_pattern="-e $i $grep_pattern"
> +done
> +
> +for i in *; do
> +	if ! echo $i | grep -q $grep_pattern; then
> +		echo "===== $i ====="
> +		./$i
> +		echo
> +	fi
> +done

Kind regards,
Petr


More information about the ltp mailing list