nixos/tests/timezone: port to python#74858
Merged
flokli merged 1 commit intoNixOS:masterfrom Dec 5, 2019
x123:x123-test-timezone-python
Merged
nixos/tests/timezone: port to python#74858flokli merged 1 commit intoNixOS:masterfrom x123:x123-test-timezone-python
flokli merged 1 commit intoNixOS:masterfrom
x123:x123-test-timezone-python
Conversation
Member
|
Can you add this test to |
Contributor
Author
|
@flokli yep, done. |
tfc
reviewed
Dec 3, 2019
nixos/tests/timezone.nix
Outdated
Contributor
There was a problem hiding this comment.
can you make comments like "Adjustment should persist across a reboot" a subtest, so this information is even visible in the log?
tfc
approved these changes
Dec 3, 2019
Member
|
@GrahamcOfBorg test timezone |
flokli
requested changes
Dec 4, 2019
nixos/tests/timezone.nix
Outdated
Member
There was a problem hiding this comment.
The linter complains here:
⇒ nix-build nixos/tests/timezone.nix -A timezone-static
these derivations will be built:
/nix/store/q7dwy5fkiahdv9q65c17pzgh90aqxppj-nixos-test-driver-timezone-static.drv
/nix/store/769fsp2qh581h181ffg09n6dlb0pxmn2-vm-test-run-timezone-static.drv
building '/nix/store/q7dwy5fkiahdv9q65c17pzgh90aqxppj-nixos-test-driver-timezone-static.drv'...
--- /nix/store/q0z2dazvilyzyk57sw0y4fcfw80zmf3x-nixos-test-driver-timezone-static/test-script 2019-12-04 00:10:57.981288 +0000
+++ /nix/store/q0z2dazvilyzyk57sw0y4fcfw80zmf3x-nixos-test-driver-timezone-static/test-script 2019-12-04 00:10:58.142654 +0000
@@ -1,7 +1,5 @@
machine.wait_for_unit("dbus.socket")
machine.fail("timedatectl set-timezone Asia/Tokyo")
date_result = machine.succeed('date -d @0 "+%Y-%m-%d %H:%M:%S"')
-assert (
- date_result == "1970-01-01 01:00:00\n"
-), "Timezone seems to be wrong"
+assert date_result == "1970-01-01 01:00:00\n", "Timezone seems to be wrong"
would reformat /nix/store/q0z2dazvilyzyk57sw0y4fcfw80zmf3x-nixos-test-driver-timezone-static/test-script
Oh no! 💥 💔 💥
1 file would be reformatted.
builder for '/nix/store/q7dwy5fkiahdv9q65c17pzgh90aqxppj-nixos-test-driver-timezone-static.drv' failed with exit code 1
cannot build derivation '/nix/store/769fsp2qh581h181ffg09n6dlb0pxmn2-vm-test-run-timezone-static.drv': 1 dependencies couldn't be built
error: build of '/nix/store/769fsp2qh581h181ffg09n6dlb0pxmn2-vm-test-run-timezone-static.drv' failed
nixos/tests/all-tests.nix
Outdated
Member
There was a problem hiding this comment.
This fails to run:
⇒ nix-build -A nixosTests.timezone
error: attempt to call something which is not a function but a set, at /home/flokli/dev/nixos/nixpkgs-gitlab/nixos/tests/all-tests.nix:18:20
Member
|
ping @x123 |
Contributor
Author
|
@flokli actually, I think I managed to fix it. |
Member
|
There was a stray newline. Rebased on latest master and squashed. |
Member
|
@GrahamcOfBorg test timezone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Port
timezonetest to python for #72828Things done
Ported
timezonetest to python.sandboxinnix.confon non-NixOS linux)nixos/tests/timezone.nixNotify maintainers
cc @lheckemann