-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add helpers for application testing #44
base: main
Are you sure you want to change the base?
Conversation
Example of using both:
Which runs Xvfb, and the system + session busses to execute each of the tests in the binary separately. |
162cc87
to
c253847
Compare
This test will automatically start up Xvfb and both a system and session bus. This can be useful for testing UI application.
This is just a simple wrapper that allows calling test binaries created with the GLib testing infrastructure and produces nicer output. In particular, the output will only be printed if the test failed. There is fallback code which will simply run the binary as is.
0775839
to
29e38c8
Compare
313d585
to
1a89bcd
Compare
f7c9d0d
to
4a191d8
Compare
3688b29
to
b46214e
Compare
|
||
@staticmethod | ||
def make_tests(exe, result): | ||
test = subprocess.Popen([exe, '-l'], stdout=subprocess.PIPE, stderr=PIPE_DEVNULL) |
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.
We ran into the problem today that this particular execution is done without an X11 server started, which means that it can fail if the process needs X11 to initialise.
I am currently working on adding testing to g-c-c and would also like to streamline the code for g-s-d. For this, I worked on the two classes in these commits, and I was wondering whether it might be feasible to merge at least the X11 helper into dbusmock in some form.