Merge lp:~linaro-infrastructure/cbuild/sort-filelists-for-size into lp:cbuild

Proposed by Paul Sokolovsky
Status: Merged
Merged at revision: 449
Proposed branch: lp:~linaro-infrastructure/cbuild/sort-filelists-for-size
Merge into: lp:cbuild
Diff against target: 14 lines (+2/-2)
1 file modified
lib/steps.mk (+2/-2)
To merge this branch: bzr merge lp:~linaro-infrastructure/cbuild/sort-filelists-for-size
Reviewer Review Type Date Requested Status
Linaro Toolchain Developers Pending
Review via email: mp+145349@code.launchpad.net

Description of the change

Sort filelists for running thru size, du, as part of "run" step and "*-run.txt" lo, because otherwise the order is random which complicates comparing results of different builds. This came out when validating LAVA builds, cf. for example http://cbuild.validation.linaro.org/build/gcc-linaro-4.7-2013.01/logs/armv7l-precise-cbuild446-tcpanda11-cortexa9hfr1/gcc-run.txt and http://cbuild.validation.linaro.org/build/gcc-linaro-4.7-2013.01/logs/armv7l-precise-cbuild448-lava-cortexa9hfr1/gcc-run.txt

To post a comment you must log in.
Revision history for this message
Christophe Lyon (christophe-lyon) wrote :

Shouldn't you sort on file names instead? Or sort numerically (sort -n)?

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Well, the sort is applied to results of "find" (possibly, filtered), so, those are file paths relative to some build dir, e.g. "gcc-linaro-4.7-2013.01/gcc/default/install/libexec/gcc/arm-linux-gnueabi/4.7.3/cc1objplus". IMHO, it makes full sense to sort on such path as is, hence "sort" without any arguments.

Revision history for this message
Christophe Lyon (christophe-lyon) wrote :

You are obviously right; I read the patch too quickly and was confused by the gcc-run.txt link which starts with file sizes. OK for me.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Thanks, merging it then to apply to next LAVA test build.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/steps.mk'
2--- lib/steps.mk 2013-01-26 09:14:43 +0000
3+++ lib/steps.mk 2013-01-29 11:58:24 +0000
4@@ -118,8 +118,8 @@
5
6 # Default versions of the rules
7 get-sizes:
8- ALL="$(shell find -L $(VBUILD)/install/ -executable -and -type f -exec file {} \; | grep ELF | awk -F: '{print $$1;}')"; \
9- LIBS="$(shell find -L $(VBUILD)/install/ -type f -name '*.a')"; \
10+ ALL="$(shell find -L $(VBUILD)/install/ -executable -and -type f -exec file {} \; | grep ELF | awk -F: '{print $$1;}' | sort)"; \
11+ LIBS="$(shell find -L $(VBUILD)/install/ -type f -name '*.a' | sort)"; \
12 strip $$ALL; \
13 size $$ALL > $(STEP).txt; \
14 echo du: >> $(STEP).txt; \

Subscribers

People subscribed via source and target branches