From: Thibaut VARÈNE Date: Thu, 21 Jun 2018 18:16:42 +0000 (+0200) Subject: phase1: report ccache stats at end of build X-Git-Tag: v1~144 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f5d0974c1ae3e302aec7767228cb87b61767be5c;p=buildbot.git phase1: report ccache stats at end of build ccache.sh tries to report ccache statistics but at the time this script is run, the ccache binary hasn't been built and is thus unavailable. This patch tries to run 'ccache -s' at the end of the build. It will look for ccache in the staging_dir first then in the host PATH. Signed-off-by: Thibaut VARÈNE --- diff --git a/phase1/ccache.sh b/phase1/ccache.sh index 3c4c614..8756bc2 100755 --- a/phase1/ccache.sh +++ b/phase1/ccache.sh @@ -18,6 +18,4 @@ for dir in $(make --no-print-directory val.TOOLCHAIN_DIR val.STAGING_DIR val.STA fi done -./staging_dir/host/bin/ccache -s 2>/dev/null - exit 0 diff --git a/phase1/master.cfg b/phase1/master.cfg index b0e6422..b4da1ad 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -960,6 +960,18 @@ for target in targets: alwaysRun = True )) + factory.addStep(ShellCommand( + name = "ccachestat", + description = "Reporting ccache stats", + command=["ccache", "-s"], + env = MakeEnv(overrides={ 'PATH': ["./staging_dir/host/bin", "${PATH}"] }), + want_stderr = False, + haltOnFailure = False, + flunkOnFailure = False, + warnOnFailure = False, + alwaysRun = True, + )) + from buildbot.config import BuilderConfig c['builders'].append(BuilderConfig(name=target, slavenames=slaveNames, factory=factory, nextBuild=GetNextBuild))