This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Use $(PYTHON) in benchtests.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Sat, 20 Jun 2015 21:20:43 -0400
- Subject: [PATCH] Use $(PYTHON) in benchtests.
- Authentication-results: sourceware.org; auth=none
If you add the benchtests to an older glibc source tree as a patch
it results in *.py files which are not executable. This means you
can't immediately run the benchtests without making the scripts
executable. To fix this we should run them via the interpreter.
Eventually we might want to setup configure to detect and find python,
like if we need python3, but for now this solves my immediate problem.
OK to checkin?
2015-06-20 Carlos O'Donell <carlos@redhat.com>
* benchtests/Makefile (PYTHON): Define.
(bench-func): Use $(PYTHON) to run python scripts.
($(objpfx)bench-%.c): Likewise.
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 8e615e5..4bae26c 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -15,10 +15,11 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
-
# Makefile for benchmark tests. The only useful target here is `bench`.
# Add benchmark functions in alphabetical order.
+PYTHON := python
+
subdir := benchtests
include ../Makeconfig
@@ -155,7 +156,7 @@ bench-func: $(binaries-bench)
mv -f $(objpfx)bench.out $(objpfx)bench.out.old; \
fi; \
mv -f $(objpfx)bench.out-tmp $(objpfx)bench.out
- scripts/validate_benchout.py $(objpfx)bench.out \
+ $(PYTHON) scripts/validate_benchout.py $(objpfx)bench.out \
scripts/benchout.schema.json
$(timing-type) $(binaries-bench) $(binaries-benchset) \
@@ -168,5 +169,5 @@ $(objpfx)bench-%.c: %-inputs $(bench-deps)
{ if [ -n "$($*-INCLUDE)" ]; then \
cat $($*-INCLUDE); \
fi; \
- scripts/bench.py $(patsubst %-inputs,%,$<); } > $@-tmp
+ $(PYTHON) scripts/bench.py $(patsubst %-inputs,%,$<); } > $@-tmp
mv -f $@-tmp $@
---
Cheers,
Carlos.