This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [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: Wed, 13 Jan 2016 11:01:33 -0500
- Subject: Re: [PATCH] Use $(PYTHON) in benchtests.
- Authentication-results: sourceware.org; auth=none
- References: <5586116B dot 90005 at redhat dot com>
On 06/20/2015 09:20 PM, Carlos O'Donell wrote:
> 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 $@
> ---
Checked in.
Cheers,
Carlos.