Skip to content

Remove xvfb as dependancy for plotting tests#401

Closed
albheim wants to merge 5 commits intomasterfrom
plotting_test_no_x
Closed

Remove xvfb as dependancy for plotting tests#401
albheim wants to merge 5 commits intomasterfrom
plotting_test_no_x

Conversation

@albheim
Copy link
Copy Markdown
Member

@albheim albheim commented Nov 23, 2020

I noticed that PkgEval does not seem happy with ControlSystems, and after checking with @mfalt he thought this might be because there is tests that require plotting which will not run on a headless server if just running test ControlSystems.

ControlSystems CI pipeline seems to use xvfb to emulate a virtual x environment to allow for some of the plot tests to run.

I found this discourse thread discussing plotting on headless servers and thought I would check what the difference was using nul instad of 100 for GKSwstype.

@albheim albheim changed the title Remove xvfb and set gkswstype to nul Remove xvfb as dependancy for plotting tests Nov 23, 2020
@mfalt
Copy link
Copy Markdown
Member

mfalt commented Nov 23, 2020

If tests pass with this (and Plots are able to build in makedocs) I think it's a great fix. If the second doesn't work we could probably just add the xvfb to the makedocs part.

@JuliaControlBot
Copy link
Copy Markdown

This is an automated message.
Plots were compared to references. No changes were detected.

1 similar comment
@JuliaControlBot
Copy link
Copy Markdown

This is an automated message.
Plots were compared to references. No changes were detected.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 23, 2020

Codecov Report

Merging #401 (077e75f) into master (2fd813d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #401   +/-   ##
=======================================
  Coverage   82.40%   82.40%           
=======================================
  Files          31       31           
  Lines        2824     2824           
=======================================
  Hits         2327     2327           
  Misses        497      497           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2fd813d...077e75f. Read the comment docs.

@albheim
Copy link
Copy Markdown
Member Author

albheim commented Nov 23, 2020

I was also wondering if there is a reason for having these settings spread out over three files? Would it not be enough to set it in runtests.jl and we could skip the rest?

If people want to run make.jl or test_plot.jl by itself I think it is fine to assume they can know enough to set the plotting environment themselves?

And the one in .travis.yml seems like it is not really necessary at all if it is no matter set in the files where it matters anyway?

What is PLOT_TEST even used for? Could only find it in three places in the repo, and that was the three places it was set.

@mfalt
Copy link
Copy Markdown
Member

mfalt commented Nov 23, 2020

I was also wondering if there is a reason for having these settings spread out over three files? Would it not be enough to set it in runtests.jl and we could skip the rest?

If people want to run make.jl or test_plot.jl by itself I think it is fine to assume they can know enough to set the plotting environment themselves?

And the one in .travis.yml seems like it is not really necessary at all if it is no matter set in the files where it matters anyway?

Even though I know how to do it, it is nice to be able to run the scipts locally whithout editing them. But in general it is needed in test_plots.jl so you can run
]test ControlSystems
locally, even on headless-server. In docs/make.jl so you can run makedocs(modules=[ControlSystems]).
Maybe it can be removed in travis.yml if it is included in those files.

What is PLOT_TEST even used for? Could only find it in three places in the repo, and that was the three places it was set.

This is read by Plots.jl. For example it is used in Plots.jl tests: https://github.com/JuliaPlots/Plots.jl/blob/2774b155b4c2b70db3fefd80bd623c34afed992f/test/runtests.jl#L100
It seems to be related to keeping the performance constant when there is no display information: https://github.com/JuliaPlots/Plots.jl/pull/1318/files
Edit: I added it for some reason, but I don't remember exactly.

@albheim
Copy link
Copy Markdown
Member Author

albheim commented Nov 23, 2020

Even though I know how to do it, it is nice to be able to run the scipts locally whithout editing them. But in general it is needed in test_plots.jl so you can run
]test ControlSystems
locally, even on headless-server. In docs/make.jl so you can run makedocs(modules=[ControlSystems]).
Maybe it can be removed in travis.yml if it is included in those files.

Okay, I was thinking that you might want to run it with other settings if you are not on a headless server but I realise that we probably prefer consistency in test/docs as the default and if you really want to run it in some other way you can dig in there and change it.

This is read by Plots.jl. For example it is used in Plots.jl tests: https://github.com/JuliaPlots/Plots.jl/blob/2774b155b4c2b70db3fefd80bd623c34afed992f/test/runtests.jl#L100
It seems to be related to keeping the performance constant when there is no display information: https://github.com/JuliaPlots/Plots.jl/pull/1318/files
Edit: I added it for some reason, but I don't remember exactly.

Okay, seems good as it is then.

@albheim albheim requested a review from mfalt November 23, 2020 22:47
@albheim
Copy link
Copy Markdown
Member Author

albheim commented Nov 24, 2020

I also tried to run the tests without our travis settings on my headless workstation and it seems to work fine so hopefully this could solve the PkgEval problem.

@albheim albheim mentioned this pull request Dec 15, 2020
@albheim
Copy link
Copy Markdown
Member Author

albheim commented Jan 16, 2021

This was solved in #408

@albheim albheim closed this Jan 16, 2021
@albheim albheim deleted the plotting_test_no_x branch January 17, 2021 09:33
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