-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests fail with SOURCE_DATE_EPOCH set #2405
Comments
I agree with the workaround. Tests that want to check that behavior can set it explicitly. I think there's only one test that does handle it and it already does manage the variable. @lucab what do you think? |
Yes, I'd agree it would be good to fix the tests upstream (i.e. here). It would be good to see what is the situation across the whole testsuite. If it is only |
From a previous attempt: ostree_2021.3-1_amd64_20210725t181136.build.gz
I didn't upload the version that was failing tests, because it was failing tests :-) The finalized version of 2021.3-1 with the workaround is only in
https://salsa.debian.org/debian/ostree/-/blob/debian/experimental/debian/test.sh wraps
|
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. Resolves: ostreedev#2405 Signed-off-by: Simon McVittie <smcv@collabora.com>
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
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
Debian builds official packages with SOURCE_DATE_EPOCH set to the date in the Debian changelog, to get a reproducible result from the same source code.
Unfortunately, since 2021.3 this seems to be making several build-time unit tests fail with this message:
I think this is probably because the tests build more than one ostree commit, expecting the second one to have a strictly higher mtime, but the new
SOURCE_DATE_EPOCH
support gives them both the same mtime.At the moment I'm working around this with
unset SOURCE_DATE_EPOCH
before running the tests in the packaging, but ideally the affected tests would unset this themselves.The text was updated successfully, but these errors were encountered: