1# Copyright (c) 2013 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/util/lastchange.gni")
6
7action("chromium_git_revision") {
8  script = "version.py"
9
10  template_file = "chromium_git_revision.h.in"
11  inputs = [
12    lastchange_file,
13    template_file,
14  ]
15
16  output_file = "$target_gen_dir/chromium_git_revision.h"
17  outputs = [ output_file ]
18
19  args = [
20    # LASTCHANGE contains "<build hash>-<ref>".  The user agent only wants the
21    # "<build hash>" bit, so chop off everything after it.
22    "-e",
23    "LASTCHANGE=LASTCHANGE[:LASTCHANGE.find('-')]",
24    "-f",
25    rebase_path(lastchange_file, root_build_dir),
26    rebase_path(template_file, root_build_dir),
27    rebase_path(output_file, root_build_dir),
28  ]
29}
30
31group("test_results") {
32  data = [
33    "//.vpython",
34    "//.vpython3",
35    "//build/util/lib/__init__.py",
36    "//build/util/lib/results/",
37  ]
38}
39