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]

[PATCH v3] Allow adding arbitrary code to benchmark tests


On Wed, Mar 20, 2013 at 02:17:06PM +0100, Andreas Schwab wrote:
> There is no need to use a subshell, braces are enough.
> 

Here's v3 then.  Looks OK?

Siddhesh


diff --git a/Rules b/Rules
index bc5dacd..ab9ae9b 100644
--- a/Rules
+++ b/Rules
@@ -210,8 +210,11 @@ $(binaries-bench): %: %.o \
 	$(+link)
 
 $(objpfx)bench-%.c: %-inputs bench-skeleton.c
+	{ if [ -n "$($*-INCLUDE)" ]; then \
+	  cat $($*-INCLUDE); \
+	fi; \
 	$(..)scripts/bench.pl $(patsubst %-inputs,%,$<) \
-	  $($*-ITER) $($*-ARGLIST) $($*-RET) > $@
+	  $($*-ITER) $($*-ARGLIST) $($*-RET); } > $@
 
 
 .PHONY: distclean realclean subdir_distclean subdir_realclean \


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