From 3ba8bf78cde757c06666ef20f50fe4e9d3bb500a Mon Sep 17 00:00:00 2001 From: DougCh Date: Fri, 16 Jun 2023 22:51:24 +0000 Subject: [PATCH] nix: skip ssllyze on aarch64 --- CMakeLists.txt | 7 +++++++ nix/pyenv.nix | 27 +++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc8e6554842..03fe5de52c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -593,6 +593,13 @@ if (BUILD_TESTING) # For Nix and environments where LD_LIBRARY_PATH is already correct. # We're also dropping tox and calling pytest directly, because # Nix is already handling all of the python setup. + if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND ${test_target} STREQUAL "integrationv2_sslyze" ) + # Skip sslyze/nassl on non-x86; it has not been built for arm + # and pytest.importskip() is still failing the test. + message(WARNING "Not adding integ test ${test_target} on ${CMAKE_SYSTEM_PROCESSOR}") + continue() + endif() + message(STATUS "Adding integ test ${test_target}") add_test(NAME ${test_target} COMMAND pytest diff --git a/nix/pyenv.nix b/nix/pyenv.nix index fad643695d4..cfe9d46e258 100644 --- a/nix/pyenv.nix +++ b/nix/pyenv.nix @@ -33,15 +33,18 @@ let pydantic # >=1.7,<1.9 TODO: check if this version is correct/if it matters ]; }; -in pkgs.python310.withPackages (ps: [ - ps.pep8 - ps.pytest # ==5.3.5 TODO: check if this version is correct/if it matters - ps.pytest-xdist # ==1.34.0 TODO: check if this version is correct/if it matters - sslyze # ==5.0.2 TODO: check if this version is correct/if it matters - ps.pytest-rerunfailures - ps.tox - ps.typing-extensions - ps.setuptools-rust - ps.cryptography - nassl -]) +in pkgs.python310.withPackages (ps: + [ + ps.pep8 + ps.pytest + ps.pytest-xdist + ps.pytest-rerunfailures + ps.typing-extensions + ps.setuptools-rust + ps.cryptography + ] ++ (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then [ + nassl + sslyze + ] else + [ ])) +