Skip to content
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

Default environment variables for tests #4593

Merged
merged 3 commits into from
Mar 25, 2023

Conversation

tertsdiepraam
Copy link
Member

@tertsdiepraam tertsdiepraam commented Mar 23, 2023

Closes #4586 and hopefully also #4253 but I won't let it close the latter automatically.

We now run each command with TZ=UTC and LC_ALL=C to ensure consistent
behavior independent from external timezone and locale settings. These
can still be overridden with other values if necessary.
Use a specific time to check whether any DST problems arise. The test is
also ignored, because this functionality seems to be broken at the
moment. Still, this is an improvement, because it is more reliable and
does not need to obtain a local offset, which might lead to a panic in
the time library.
@tertsdiepraam
Copy link
Member Author

tertsdiepraam commented Mar 23, 2023

I think the DST test I changed in the second commit was actually broken since #3319? Unless I'm making some mistake. GNU is failing for the timezone and time that I give it but uutils doesn't.

@tertsdiepraam tertsdiepraam changed the title Default env for tests Default environment variables for tests Mar 23, 2023
@tertsdiepraam tertsdiepraam requested a review from sylvestre March 23, 2023 18:44
@sylvestre
Copy link
Contributor

touch: move from time to chrono

Maybe in a separate PR ?

@tertsdiepraam tertsdiepraam force-pushed the default-env-for-tests branch from e40be52 to 2e104e4 Compare March 24, 2023 10:58
@tertsdiepraam
Copy link
Member Author

tertsdiepraam commented Mar 24, 2023

Yeah that's probably better.

Edit: Done :)

@sylvestre sylvestre merged commit 5d3b7e3 into uutils:main Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run tests with TZ=UTC by default
2 participants