-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CI: Running tests with xvfb for the clipboard to work #26932
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
Conversation
No idea why And it also worries me, that in my fork pipelines (I set it up to test changes to the CI), things fail that don't fail here. I feel like I was dealing with windows 95... :\ |
In the build |
I see that |
@@ -46,6 +46,11 @@ do | |||
fi | |||
|
|||
PYTEST_CMD="pytest -m \"$TYPE_PATTERN$PATTERN\" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $TEST_ARGS $COVERAGE pandas" | |||
if [[ "$(uname)" == "Linux" ]]; then | |||
# This is required for the clipboard to work (X virtual frambuffer implements the X server API, required by the clipboard tools, without running an actual X server) | |||
DISPLAY=:99.0 |
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.
so u prob need to start xvfb much earlier and background it
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.
I'm using xvfb-run, which starts it for the command, and stops it when the command finishes. It's what xvfb's got in the azure servers. I guess something else can be installed, but I'll see what I can do.
May be time to try again to call the tests just once (not twice for single and multi). :)
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.
I think I’ve seen similar things for matplotlib headless tests. IIRC they add a 1-second sleep after this for the thing to start
Maybe try in a step before? On Travis, they explicitly say in their docs it needs to be run in the "before_script" section (so the section where the tests are run) |
… xvfb is still running, as it looks like
I think the @jorisvandenbossche not an expert, but what I'm doing now is a bit different than what we've got in travis. In travis we just start the xvfb, and leaving it running. Here I use |
Confirmed that the problem is that I can do a sleep for now if you want to get this in faster, but I think the right solution is the approach in #24106 I see that in travis the same solution doesn't seem to work, and clipboard tests are skipped. :\ |
Codecov Report
@@ Coverage Diff @@
## master #26932 +/- ##
==========================================
- Coverage 91.87% 91.86% -0.01%
==========================================
Files 180 180
Lines 50716 50743 +27
==========================================
+ Hits 46593 46617 +24
- Misses 4123 4126 +3
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #26932 +/- ##
==========================================
- Coverage 91.87% 91.86% -0.01%
==========================================
Files 180 180
Lines 50743 50743
==========================================
- Hits 46620 46616 -4
- Misses 4123 4127 +4
Continue to review full report at Codecov.
|
In the previous PR where I fixed those tests, I moved it back from run_tests.sh to before_script exactly because it was not working there (as said, it's in the documentation of travis it needs to be there). You're free to try to find a solution that works for both, but personally I wouldn't spend too much time on that if you have something that works for Azure. |
Going for the simple hacking solution for now, so the tests start running. If I have time I'll give another try to call pytest just once, that will solve the problem for azure, and simplify the CI significantly. |
… wait for previous run to finish
Closing this, as I think it make more sense to implement those changes in a fresh PR after #26949 is merged (which will simplify this significantly). |
git diff upstream/master -u -- "*.py" | flake8 --diff
With some luck this should make the clipboard tests work in azure. @jorisvandenbossche @jreback can you have a look once the CI finishes?