diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/base/test/generate_fontconfig_caches.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/test/generate_fontconfig_caches.cc')
-rw-r--r-- | chromium/base/test/generate_fontconfig_caches.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/chromium/base/test/generate_fontconfig_caches.cc b/chromium/base/test/generate_fontconfig_caches.cc index cd01d551ef0..84eac2b5c1c 100644 --- a/chromium/base/test/generate_fontconfig_caches.cc +++ b/chromium/base/test/generate_fontconfig_caches.cc @@ -25,16 +25,14 @@ // determinism. We have no way of guaranteeing that this produces correct // results, or even has the intended effect. int main() { - // fontconfig generates a random uuid and uses it to match font folders with - // the font cache. Rather than letting fontconfig generate a random uuid, - // which introduces build non-determinism, we place a fixed uuid in the font - // folder, which fontconfig will use to generate the cache. base::FilePath dir_module; base::PathService::Get(base::DIR_MODULE, &dir_module); - base::FilePath uuid_file_path = - dir_module.Append("test_fonts").Append(".uuid"); - const char uuid[] = "fb5c91b2895aa445d23aebf7f9e2189c"; - WriteFile(uuid_file_path, uuid); + + // This is the MD5 hash of "/test_fonts", which is used as the key of the + // fontconfig cache. + // $ echo -n /test_fonts | md5sum + // fb5c91b2895aa445d23aebf7f9e2189c - + static const char kCacheKey[] = "fb5c91b2895aa445d23aebf7f9e2189c"; // fontconfig writes the mtime of the test_fonts directory into the cache. It // presumably checks this later to ensure that the cache is still up to date. @@ -61,6 +59,6 @@ int main() { // Check existence of intended fontconfig cache file. CHECK(base::PathExists( - fontconfig_caches.Append(base::StrCat({uuid, "-le64.cache-7"})))); + fontconfig_caches.Append(base::StrCat({kCacheKey, "-le64.cache-7"})))); return 0; } |