diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-04-29 11:06:00 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-04-29 11:48:16 +0530 |
commit | 944afe6d9589c6000327898bcd28c0ee8cf63669 (patch) | |
tree | 0d19da0b101498faa745e7542e8c4be7261bbdb1 /benchtests/Makefile | |
parent | 118a2aee07f64d605b6668cbe195c1f44eac6be6 (diff) | |
download | glibc-944afe6d9589c6000327898bcd28c0ee8cf63669.tar glibc-944afe6d9589c6000327898bcd28c0ee8cf63669.tar.gz glibc-944afe6d9589c6000327898bcd28c0ee8cf63669.tar.bz2 glibc-944afe6d9589c6000327898bcd28c0ee8cf63669.zip |
benchtests: Add UNSUPPORTED benchmark status
The libmvec benchmarks print a message indicating that a certain CPU
feature is unsupported and exit prematurelyi, which breaks the JSON in
bench.out.
Handle this more elegantly in the bench makefile target by adding
support for an UNSUPPORTED exit status (77) so that bench.out continues
to have output for valid tests.
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'benchtests/Makefile')
-rw-r--r-- | benchtests/Makefile | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/benchtests/Makefile b/benchtests/Makefile index b477042e6c..7943d1c58a 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -1,4 +1,5 @@ # Copyright (C) 2013-2022 Free Software Foundation, Inc. +# Copyright The GNU Toolchain Authors. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -417,11 +418,23 @@ bench-func: $(binaries-bench) echo "{\"timing_type\": \"$${timing_type}\","; \ echo " \"functions\": {"; \ for run in $^; do \ - if ! [ "x$${run}" = "x$<" ]; then \ - echo ","; \ - fi; \ - echo "Running $${run}" >&2; \ - $(run-bench) $(DETAILED_OPT); \ + op=$$($(run-bench) $(DETAILED_OPT)); \ + ret=$$?; \ + case "$${ret}" in \ + 77) \ + echo "UNSUPPORTED $${run}: $${op}" >&2; \ + ;; \ + 0) \ + echo "Running $${run}" >&2; \ + if [ "$${run}" != "$<" ]; then \ + echo ","; \ + fi; \ + echo "$${op}"; \ + ;; \ + *) \ + echo "FAILED $${run}" >&2; \ + ;; \ + esac; \ done; \ echo; \ echo " }"; \ |