ccache: Fix for distcc cross-compiling / various improvements (#1026)

* ccache: Fix for distcc cross-compiling / various improvements

* Make ccache work when cross-compiling with distcc (fix #716)
* Allow to configure the ccache size in "pmbootstrap init"
* Moved ccache stats code from pmb/build/other.py to
  pmb/helpers/frontend.py
* Grouped job count, ccache size and timestamp based rebuilds
  together to "build options" and allow to skip them
* Sorted config options that had to be modified anyway
  alphabetically

* Improve comment in arch-bin-masquerade APKBUILD
This commit is contained in:
Oliver Smith 2017-12-21 16:42:29 +00:00 committed by GitHub
parent 071ec4c214
commit 567ac64e26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 213 additions and 96 deletions

View file

@ -229,13 +229,13 @@ def test_run_abuild(args, monkeypatch):
assert func(args, apkbuild, "armhf", cross="native") == (output, cmd, env)
# cross=distcc
env = {"CARCH": "armhf",
"PATH": "/usr/lib/distcc/bin:" + pmb.config.chroot_path,
"DISTCC_HOSTS": "127.0.0.1:33632"}
cmd = ["CARCH=armhf", "PATH=" + "/usr/lib/distcc/bin:" +
pmb.config.chroot_path, "DISTCC_HOSTS=127.0.0.1:33632", "abuild",
"-d"]
assert func(args, apkbuild, "armhf", cross="distcc") == (output, cmd, env)
(output, cmd, env) = func(args, apkbuild, "armhf", cross="distcc")
assert output == "armhf/test-1-r2.apk"
assert env["CARCH"] == "armhf"
assert env["CCACHE_PREFIX"] == "distcc"
assert env["CCACHE_PATH"] == "/usr/lib/arch-bin-masquerade/armhf:/usr/bin"
assert env["CCACHE_COMPILERCHECK"].startswith("string:")
assert env["DISTCC_HOSTS"] == "127.0.0.1:33632"
def test_finish(args, monkeypatch):