nixos/systemd: Add package version tests to integration tests#443216
nixos/systemd: Add package version tests to integration tests#443216LordGrimmauld merged 1 commit intoNixOS:masterfrom
Conversation
LordGrimmauld
left a comment
There was a problem hiding this comment.
i am a little confused, why is one an assert in and the other a succeed(" | grep") ? This feels more inconsistent than it could be.
|
@LordGrimmauld It might just be a preference thing but personally I prefer using |
sure, but why not make both of them |
|
Because |
|
but you are grepping through stdout, not through a log file. I don't see the point still. |
|
@LordGrimmauld This is pretty much the established pattern for using |
LordGrimmauld
left a comment
There was a problem hiding this comment.
Maybe, but in that case journalctl supports a --grep flag (and you'll probably want to add regex escapes, the version string will contain . which is a special thing in regex).
7364040 to
738cb93
Compare
LordGrimmauld
left a comment
There was a problem hiding this comment.
Tested, the "happy path" works, but if the version is broken the test will stall.
738cb93 to
2b80bf0
Compare
|
Wait I don't understand; why do we want this? It's not like there's any risk of a different version leaking in somehow, and this just makes it more annoying to bisect systemd bugs. |
|
There is scenarios in which this breaks. It just broke for me yesterday: The git merge between #442587 and #427968 will not report conflicts around the version field, yet it would fail to actually bump the version of systemd. However, because the hash would be bumped, in case of a cached source systemd would still build with the new source. And this test would catch that error, i believe/hope. |
Adds a package version test to the systemd integration tests.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.