diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-04-03 14:20:56 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-04-03 15:52:16 +0530 |
commit | 90d5d5bbd8a6d41926c8bb6ac9f367bf956c623f (patch) | |
tree | c18d6ba8ae7dc505f5338b8c406bc7faae93a506 /Rules | |
parent | 73e0cd5d0de276a6c41c78920ff79d8e11991240 (diff) | |
download | glibc-90d5d5bbd8a6d41926c8bb6ac9f367bf956c623f.tar.gz |
Update bench.out and bench.out.old only upon completion
Write output from the currently running benchmark into a temporary
file and move files around only once the current run is complete.
That way we don't lose data from the last two runs due to an
incomplete run.
Diffstat (limited to 'Rules')
-rw-r--r-- | Rules | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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))) \ |