-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Port gnome3 like tests to python and udisks2 #72860
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a function for gnome-desktop-testing-runner too.
nixos/tests/packagekit.nix
Outdated
|
||
# send a dbus message to activate the service | ||
$machine->succeed("dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.DBus.Introspectable.Introspect"); | ||
machine.succeed("dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.DBus.Introspectable.Introspect") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the dbus API added or will it come later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean in the testing driver? I don't think so, but I have some great ideas of all the things that should be added there. Currently they've tried to go for a 1:1 port from the perl one.
I can make it similar to #34987 (comment) but maybe (description is |
88244d9
to
3be01be
Compare
@jtojnar I've added a Would you prefer having everything in one file like I've done, or perhaps the |
I think one file per test is still a good idea, some of them are slightly more complicated, recall also I am also not sure about the |
I just wanted the function name to express that it's just for projects that use I will change the structure though, |
3be01be
to
2aaf62a
Compare
I am a bit confused by the moving of the tests. In the package set, I thought the plan was to get rid of the |
|
2aaf62a
to
189ff39
Compare
From IRC:
|
|
||
$machine->succeed("udisksctl info -b /dev/vda >&2"); | ||
$machine->fail("udisksctl info -b /dev/sda1"); | ||
with lzma.open( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why space this around, "${stick}"
is much shorter than the line below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
black fails on line length, as this becomes a nix store path so it demands I format it this way. We should probably make that more relaxed. Similarly I've had to format makeInstalledTest
testscript injection specifically with concatenating multi-line strings so it doesn't error out on it not being pretty.
189ff39
to
e4bf4cd
Compare
}; | ||
|
||
extraTestScript = '' | ||
# dogtail needs accessibility enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, we should probably have a module for this. Depends on #54150
, testConfig ? {} # Config to inject into machine | ||
, extraTestScript ? "" # Test script snippet to inject before gnome-desktop-testing-runnner begins | ||
, withX11 ? false # Does test need X11? | ||
, testRunnerFlags ? "" # Extra flags to pass to gnome-desktop-testing-runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should make this an array in line with structuredAttrs proposal. I can imagine python test driver to accept list of args like Python’s subprocess
module does.
e4bf4cd
to
6c1bd19
Compare
6c1bd19
to
e237fd2
Compare
@GrahamcOfBorg test udisks2 fontconfig-default-fonts packagekit |
The test script is also ported to python.
optionalPackages are deprecated.
e237fd2
to
d7c8ad7
Compare
Motivation for this change
#72828
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @