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

Reactivate integration tests #85

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Reactivate integration tests #85

wants to merge 18 commits into from

Conversation

knixeur
Copy link
Collaborator

@knixeur knixeur commented May 2, 2019

Added check for lua-posix module, it can be installed with distribution's package manager or lua rocks

  • Rebase against LGPL

  • Explain on how to install Lua Rocks

  • Autodetect (which?) Xorg binary directory

  • Explain that xorg dummy driver is required for integration testing

@knixeur knixeur changed the base branch from master to lgpl May 22, 2019 09:58
@raboof raboof changed the base branch from lgpl to master June 17, 2019 22:22
@knixeur knixeur force-pushed the luaposix branch 2 times, most recently from 14fadda to 08c4568 Compare June 24, 2019 18:06
@wilhelmy
Copy link
Collaborator

This is marked as WIP, what's missing here? I think integration tests might be a good idea if it isn't a lot of effort to finish this off.

@knixeur
Copy link
Collaborator Author

knixeur commented Oct 29, 2019

I think it's ready, it works like it did before. I think I need someone to test it too and then finish the items in the checklist (luarocks + docs)

@knixeur knixeur force-pushed the luaposix branch 2 times, most recently from 8dbec06 to a58987a Compare January 15, 2020 09:26
@raboof
Copy link
Owner

raboof commented Jan 15, 2020

very cool to replace that XDummy script with a configuration 👍 great work here

@raboof
Copy link
Owner

raboof commented Jan 16, 2020

I guess on travis we might use https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-to-run-tests-that-require-a-gui - but then perhaps we don't need to start our own X11 server in the script?

@knixeur knixeur force-pushed the luaposix branch 3 times, most recently from 62a372c to 497df4b Compare January 30, 2020 15:13
@knixeur knixeur changed the title [WIP] Reactivate integration tests Reactivate integration tests Jan 30, 2020
Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!!

Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind the mod_xrandr_mock duplication for now, but perhaps I should review the xrandr test changes a bit closer before merging ;)

@@ -22,8 +67,8 @@ print('Updating layout when there is 2 screens present')
-- remove one, and then leave checking that one was removed up to the next test.
mod_xrandr.screenlayoutupdated()

if notioncore.find_screen_id(0):mx_count() ~= 1 then
return "After updating screen 0 should have 1 workspaces instead of " ..
if notioncore.find_screen_id(0):mx_count() ~= 2 then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so updating the screen layout, with 2 screens connected, 'spontaneously' another workspace appears? That doesn't look right - might be a problem with the test setup of course, I'll try and see if I can explain this one

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've seen this on my setup, if I attach a second screen, it comes with two workspaces.

mod_xrandr.screenlayoutupdated()

if notioncore.find_screen_id(1) then
return "New number of screens should be 1, found ", notioncore.find_screen_id(1):name()
if notioncore.find_screen_id(1) ~= nil then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

end

if notioncore.find_screen_id(0):mx_count() ~= 2 then
return "Remaining screen should have 2 workspaces instead of " .. notioncore.find_screen_id(0):mx_count() ..
if notioncore.find_screen_id(0):mx_count() ~= 3 then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems surprising - but perhaps a side-effect of the previous test?

Copy link
Collaborator Author

@knixeur knixeur Jan 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be, I should do some more testing here confirmed it's a side effect of test 01

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test 02 of xinerama suffers from the same issue, if test 01 is not ran it fails. I wonder when this started to occur since I didn't modify that one.

if notioncore.find_screen_id(1):mx_nth(0):name() ~= 'WGroupWS<1>' then
return "Second workspace not correctly returned to second screen"
if notioncore.find_screen_id(0):mx_nth(1):name() ~= 'WGroupWS<1>' then
return "Second workspace correctly kept on first screen"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intent here was the test would return either "ok" or an error

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess something like "Second workspace not kept in first screen" if that's the desired behaviour

@wilhelmy
Copy link
Collaborator

wilhelmy commented Apr 5, 2020

So... do we merge this?

Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to merge this, but I'm concerned about the changes that had to be made to the tests themselves (e.g. https://github.com/raboof/notion/pull/85/files#diff-03f7dac51cb8dd97abcd62197711cb64R70).

So while the tests are 'succeeding', they are only doing so after changing the expectation in the testcase - casting doubt on whether the implementation and the test are actually OK. They're not too easy to read unfortunately... I think we should look into that better before merging.

@knixeur
Copy link
Collaborator Author

knixeur commented Apr 6, 2020

I agree with @raboof here, I think we should really understand the tests before merging this.
I don't know if the tests were wrong before I started working on this because I couldn't run them (iirc..). It might be possible to run the tests on master and see the results to compare against this.
If someone wants to give it a try I'll glad, I'm not finding free time lately to finish this.

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.

3 participants