Skip to content

Commit

Permalink
tests: Unset SOURCE_DATE_EPOCH
Browse files Browse the repository at this point in the history
Some distributions set this during build in order to have reproducible
builds from the same source code: for example, Debian uses the date
from debian/changelog.

However, some of our tests assume that `ostree commit` will result in
a commit with the current date/time, and SOURCE_DATE_EPOCH breaks that
assumption. Unset it for our build-time tests.

Bug: ostreedev/ostree#2405
Signed-off-by: Simon McVittie <smcv@collabora.com>
Applied-upstream: 2021.4, commit:2c5fa2cdb6c304394ca629c959ec53d878f3f93a

Gbp-Pq: Name tests-Unset-SOURCE_DATE_EPOCH.patch
  • Loading branch information
smcv authored and Raspbian forward porter committed Aug 26, 2021
1 parent d564e6b commit 09c6028
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ if ! test -f .testtmp; then
touch .testtmp
fi

# Some distribution builds set this, but some of our build-time tests
# assume this won't be used when committing
unset SOURCE_DATE_EPOCH

# Also, unbreak `tar` inside `make check`...Automake will inject
# TAR_OPTIONS: --owner=0 --group=0 --numeric-owner presumably so that
# tarballs are predictable, except we don't want this in our tests.
Expand Down

0 comments on commit 09c6028

Please sign in to comment.