phase1: report ccache stats at end of build
authorThibaut VARÈNE <hacks@slashdirt.org>
Thu, 21 Jun 2018 18:16:42 +0000 (20:16 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 26 Jun 2018 20:08:54 +0000 (22:08 +0200)
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 <hacks@slashdirt.org>
phase1/ccache.sh
phase1/master.cfg

index 3c4c614ed795d06950e2778a2863874028014486..8756bc25b1ba8969143d54d03e4fd8b4db5942ef 100755 (executable)
@@ -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
index b0e6422eef9efee8f872f121f809cba84dbaf43c..b4da1ad321a3c074650cb41d52a32271dc63957c 100644 (file)
@@ -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))