This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use $(PYTHON) in benchtests.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]