gns3-server,gns3-gui: enable checkPhase

This commit is contained in:
Anthony Roussel 2023-09-20 22:37:59 +02:00
parent 1387e36a73
commit e206ee4cf3
No known key found for this signature in database
GPG key ID: 9DC4987B1A55E75E
2 changed files with 35 additions and 5 deletions

View file

@ -6,6 +6,7 @@
{ lib
, python3
, fetchFromGitHub
, qt5
, wrapQtAppsHook
}:
@ -36,14 +37,25 @@ python3.pkgs.buildPythonApplication rec {
importlib-resources
];
doCheck = false; # Failing
dontWrapQtApps = true;
preFixup = ''
wrapQtApp "$out/bin/gns3"
'';
doCheck = true;
checkInputs = with python3.pkgs; [
pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
export QT_QPA_PLATFORM=offscreen
'';
meta = with lib; {
description = "Graphical Network Simulator 3 GUI (${channel} release)";
longDescription = ''

View file

@ -46,13 +46,31 @@ python3.pkgs.buildPythonApplication {
zipstream
];
# Requires network access
doCheck = false;
postInstall = ''
rm $out/bin/gns3loopback # For Windows only
'';
doCheck = true;
# Otherwise tests will fail to create directory
# Permission denied: '/homeless-shelter'
preCheck = ''
export HOME=$(mktemp -d)
'';
checkInputs = with python3.pkgs; [
pytest-aiohttp
pytest-rerunfailures
pytestCheckHook
];
pytestFlagsArray = [
# fails on ofborg because of lack of cpu vendor information
"--deselect=tests/controller/gns3vm/test_virtualbox_gns3_vm.py::test_cpu_vendor_id"
# Rerun failed tests up to three times (flaky tests)
"--reruns 3"
];
meta = with lib; {
description = "Graphical Network Simulator 3 server (${channel} release)";
longDescription = ''