Support dummy commit for LASTCHANGE

This is to generate reproducible binary between commits for Linux by giving use_dummy_lastchange=true in args.gn.

This CL makes binaries independent from commit hash at least for below (time consuming) targets on Linux.
* content_unittests
* interactive_ui_tests
* content_shell (for webkit_layout_tests)
* content_browsertests
* browser_tests

If we can generate deterministic binary, test execution on build bot can be cached. And it will improve CQ cycle time.
But we don't know how often we make changes not introducing functional change in binaries.
So this CL is mainly for getting some stats from test on Linux buildbot and evaluate whether it is better to go forward or not for other platforms.

See more backgrounds here.
https://docs.google.com/document/d/16dalG0ssugZlwc7BBzUoBQUmuqM0S_gwtG2uxL0htdw/edit#

TBR: pfeldman@chromium.org
Bug: 869348
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I1b351b2135fd5e749ed575484b2182e847a420c9
Reviewed-on: https://chromium-review.googlesource.com/1151169
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#579668}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 36541eb81aae62b267dcc88d1fdaef912450299a
This commit is contained in:
Takuto Ikuta 2018-08-01 02:09:56 +00:00 коммит произвёл Commit Bot
Родитель 89cc7949a5
Коммит 05a360b494
5 изменённых файлов: 23 добавлений и 3 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -21,3 +21,4 @@ ciopfs
/ios_files /ios_files
/mac_files /mac_files
!/util/LASTCHANGE.dummy

Просмотреть файл

@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/util/lastchange.gni")
# Template to run the tweak_info_plist.py script on a plist. # Template to run the tweak_info_plist.py script on a plist.
# #
# Arguments: # Arguments:
@ -59,7 +61,7 @@ template("tweak_info_plist") {
inputs = [ inputs = [
script, script,
"//build/util/version.py", "//build/util/version.py",
"//build/util/LASTCHANGE", lastchange_file,
"//chrome/VERSION", "//chrome/VERSION",
] ]
sources = [ sources = [

Просмотреть файл

@ -2,11 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/util/lastchange.gni")
action("webkit_version") { action("webkit_version") {
script = "version.py" script = "version.py"
lastchange_file = "LASTCHANGE"
template_file = "webkit_version.h.in" template_file = "webkit_version.h.in"
inputs = [ inputs = [
lastchange_file, lastchange_file,

1
util/LASTCHANGE.dummy Normal file
Просмотреть файл

@ -0,0 +1 @@
LASTCHANGE=thisisdummylastchange-thisisdummylastchange

16
util/lastchange.gni Normal file
Просмотреть файл

@ -0,0 +1,16 @@
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file is used to inject fixed dummy commit for commit independent
# reproducible binaries.
declare_args() {
use_dummy_lastchange = false
}
if (use_dummy_lastchange) {
lastchange_file = "//build/util/LASTCHANGE.dummy"
} else {
lastchange_file = "//build/util/LASTCHANGE"
}