summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Rules11
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index bb6fc28ac8..78a0fa36d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2013-04-03 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * Rules (bench): Move bench.out after the run is complete.
+
* Rules (bench): Echo currently running benchmark.
* benchtests/Makefile (bench): Add atan and slowatan.
diff --git a/Rules b/Rules
index 9ad1d11127..d4a0027dd6 100644
--- a/Rules
+++ b/Rules
@@ -197,13 +197,14 @@ run-bench = $(test-wrapper-env) \
$($*-ENV) $(run-via-rtld-prefix) $${run}
bench: $(binaries-bench)
- if [ -f $(objpfx)bench.out ]; then \
- mv -f $(objpfx)bench.out $(objpfx)bench.out.old; \
- fi
for run in $^; do \
echo "Running $${run}"; \
- eval $(run-bench) >> $(objpfx)bench.out; \
- done
+ eval $(run-bench) >> $(objpfx)bench.out-tmp; \
+ done; \
+ if [ -f $(objpfx)bench.out ]; then \
+ mv -f $(objpfx)bench.out $(objpfx)bench.out.old; \
+ fi; \
+ mv -f $(objpfx)bench.out-tmp $(objpfx)bench.out
$(binaries-bench): %: %.o \
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \