From 4d09a1de6a60c6f90cc88978151bcde83c8000d4 Mon Sep 17 00:00:00 2001 From: Damien Martin-Guillerez Date: Tue, 21 Nov 2017 04:09:16 -0800 Subject: SOURCE_DATE_EPOCH environment variable override the timestamp This is applying the version 1.1 of the specification (https://reproducible-builds.org/specs/source-date-epoch/) where the only timestamp that Bazel puts in the final targets is overridden by the value of SOURCE_DATE_EPOCH. This change also remove the legacy SOURCE_DATE_EPOCH handling which wasn't really following the spec. Note that Bazel itself tries hard to remove all timestamps from intermediary binaries and overridde SOURCE_DATE_EPOCH in most action, which is a not according to the version 1.0 of the spec but according to the expected change for version 1.1. RELNOTES: SOURCE_DATE_EPOCH (https://reproducible-builds.org/specs/source-date-epoch/) can be used to override the timestamp used for stamped target (when using --stamp). Fixes #2240. Change-Id: I074e7905fa6745cc706f7391340aeae9188909ca PiperOrigin-RevId: 176489717 --- src/test/shell/integration/BUILD | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/test/shell/integration/BUILD') diff --git a/src/test/shell/integration/BUILD b/src/test/shell/integration/BUILD index b2d9439542..75471033f2 100644 --- a/src/test/shell/integration/BUILD +++ b/src/test/shell/integration/BUILD @@ -203,6 +203,13 @@ sh_library( srcs = ["discard_graph_edges_lib.sh"], ) +sh_test( + name = "stamping_test", + size = "medium", + srcs = ["stamping_test.sh"], + data = [":test-deps"], +) + sh_test( name = "discard_graph_edges_test", size = "medium", -- cgit v1.2.3