This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/N] test-suite improvement - PASS/FAIL: initial patch- fix
On Mon, Sep 10, 2012 at 01:04:48PM -0400, Tomas Dohnalek wrote:
> -do-tests-clean:
> +tests-summary = $(common-objpfx)tests.sum
> +tests-summary-clean:
> + rm -f $(tests-summary)
> +
You probably want to use `-rm' here.
> diff --git a/Rules b/Rules
> index 17d938e..5a569dd 100644
> --- a/Rules
> +++ b/Rules
> @@ -127,6 +127,8 @@ binaries-shared-tests = $(filter-out $(binaries-pie) $(binaries-static), \
> $(binaries-all-tests))
> binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \
> $(binaries-all-notests))
> +test-name = $(subdir)/$(*F)
Can't we use just $(@F) here?
> +test_rc=$1
> +test_name=$2
> +
> +if [ $# -gt 2 ]; then
> + output=$3
> +else
> + output=/dev/stdout
> +fi
Is this hunk really needed? That is, couldn't we just drop this and
then in Makefiles just do
$(evaluate-test) > $(tests-summary)
Anyway, it looks like we always output into $(tests-summary)...
> +
> +if [ ${test_rc} -eq 0 ]; then
> + result="PASS"
> +else
> + result="FAIL"
> +fi
Use 2 spaces. In the future we probably will want to have
SKIP/UNSUPPORTED option too, I suspect.
> +echo "${result}: ${test_name}" >> ${output}
> +exit ${test_rc}
There's no need to use ${var}. Just $var is good enough. Thanks,
Furthermore, I'm not sure about parallel make...
Marek