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

allow to skip tests #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

allow to skip tests #227

wants to merge 1 commit into from

Conversation

milahu
Copy link
Contributor

@milahu milahu commented Dec 4, 2021

No description provided.

Copy link
Collaborator

@lapp0 lapp0 left a comment

Choose a reason for hiding this comment

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

Is this different from just setting doCheck = false;?

@milahu
Copy link
Contributor Author

milahu commented Dec 5, 2021

yes, ideally ...

this was just a quick-and-dirty patch to disable tests
some parts of checkPhase are required for nix run . and i did not know where to move them

nix-gui/flake.nix

Lines 82 to 98 in 4ed1e06

checkPhase = let
sample = "${./nixui/tests/sample}";
in ''
export QT_QPA_PLATFORM=offscreen
export QT_PLUGIN_PATH="${pkgs.qt5.qtbase}/${pkgs.qt5.qtbase.qtPluginPrefix}"
export XDG_RUNTIME_DIR=$NIX_BUILD_TOP
export HOME=$NIX_BUILD_TOP
export NIX_STATE_DIR=$NIX_BUILD_TOP
export NIX_PATH=${pkgs.path}:nixpkgs=${pkgs.path}:nixos-config=${sample}/configuration.nix
cd nixui
'' + (if runTests then ((if !enable-profiling then ''
python3 -m pytest -vv ${specific-test}
'' else ''
python3 -m cProfile -o profile -m pytest ${specific-test}
python3 -c "import pstats; p = pstats.Stats('profile'); p.strip_dirs(); p.sort_stats('cumtime'); p.print_stats(50)"
'')) else "");

the qt variables should be set via wrapQtAppsHook

@lapp0
Copy link
Collaborator

lapp0 commented Dec 9, 2021

IMO we should fix Qt environment variables instead of merging 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.

None yet

2 participants