openscad-unstable: run tests
This commit is contained in:
parent
b687a81b3f
commit
3ddb1c3c09
2 changed files with 68 additions and 7 deletions
|
@ -15,25 +15,27 @@
|
|||
, flex
|
||||
, fontconfig
|
||||
, freetype
|
||||
, ghostscript
|
||||
, glib
|
||||
, glm
|
||||
, gmp
|
||||
, harfbuzz
|
||||
, hidapi
|
||||
, lib3mf
|
||||
, libGL
|
||||
, libGLU
|
||||
, libICE
|
||||
, libSM
|
||||
, libsForQt5
|
||||
, libspnav
|
||||
, libzip
|
||||
, mesa
|
||||
, mpfr
|
||||
, python3
|
||||
, tbb_2021_8
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, wrapGAppsHook
|
||||
, xorg
|
||||
}:
|
||||
let
|
||||
# get cccl from source to avoid license issues
|
||||
|
@ -87,16 +89,17 @@ clangStdenv.mkDerivation rec {
|
|||
hash = "sha256-i2ZGYsNfMLDi3wRd/lohs9BuO2KuQ/7kJIXGtV65OQU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [ ./test.diff ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
ninja
|
||||
(python3.withPackages (ps: with ps; [ numpy pillow ]))
|
||||
bison
|
||||
cmake
|
||||
flex
|
||||
python3
|
||||
libsForQt5.qt5.wrapQtAppsHook
|
||||
llvmPackages.bintools
|
||||
wrapGAppsHook
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = with libsForQt5; with qt5; [
|
||||
# manifold dependencies
|
||||
|
@ -112,6 +115,7 @@ clangStdenv.mkDerivation rec {
|
|||
eigen
|
||||
fontconfig
|
||||
freetype
|
||||
ghostscript
|
||||
glib
|
||||
gmp
|
||||
harfbuzz
|
||||
|
@ -124,7 +128,15 @@ clangStdenv.mkDerivation rec {
|
|||
qtbase
|
||||
qtmultimedia
|
||||
]
|
||||
++ lib.optionals clangStdenv.isLinux [ libICE libSM libGLU libGL wayland wayland-protocols qtwayland ]
|
||||
++ lib.optionals clangStdenv.isLinux [
|
||||
xorg.libXdmcp
|
||||
libICE
|
||||
libSM
|
||||
wayland
|
||||
wayland-protocols
|
||||
qtwayland
|
||||
libGLU
|
||||
]
|
||||
++ lib.optional clangStdenv.isDarwin qtmacextras
|
||||
;
|
||||
cmakeFlags = [
|
||||
|
@ -133,11 +145,18 @@ clangStdenv.mkDerivation rec {
|
|||
"-DUSE_BUILTIN_OPENCSG=ON" # bundled latest opencsg
|
||||
"-DOPENSCAD_VERSION=\"${builtins.replaceStrings ["-"] ["."] version}\""
|
||||
"-DCMAKE_UNITY_BUILD=ON" # faster build
|
||||
"-DENABLE_TESTS=OFF" # tests do not work for now
|
||||
# IPO
|
||||
"-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld"
|
||||
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
|
||||
];
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
# for running mesa llvmpipe
|
||||
export __EGL_VENDOR_LIBRARY_FILENAMES=${mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json
|
||||
export LIBGL_DRIVERS_PATH=${mesa.drivers}/lib:${mesa.drivers}/lib/dri
|
||||
# some fontconfig issues cause pdf output to have wrong font
|
||||
ctest -j$NIX_BUILD_CORES -E pdfexporttest.\*
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "3D parametric model compiler (unstable)";
|
||||
longDescription = ''
|
||||
|
|
42
pkgs/by-name/op/openscad-unstable/test.diff
Normal file
42
pkgs/by-name/op/openscad-unstable/test.diff
Normal file
|
@ -0,0 +1,42 @@
|
|||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||
index 5c1b40af4..917451dee 100644
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -59,13 +59,14 @@ if(USE_IMAGE_COMPARE_PY)
|
||||
|
||||
# Since msys2 on Windows prefers bin/ over Scripts, we need to look for the actual folder to determine
|
||||
# how to utilize the venv
|
||||
- find_path(VENV_BIN_PATH activate PATHS "${VENV_DIR}/bin" "${VENV_DIR}/Scripts" NO_DEFAULT_PATH NO_CACHE)
|
||||
- if(WIN32)
|
||||
- set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python.exe")
|
||||
- else()
|
||||
- set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python")
|
||||
- endif()
|
||||
- if(EXISTS "${IMAGE_COMPARE_EXE}")
|
||||
+ # find_path(VENV_BIN_PATH activate PATHS "${VENV_DIR}/bin" "${VENV_DIR}/Scripts" NO_DEFAULT_PATH NO_CACHE)
|
||||
+ # if(WIN32)
|
||||
+ # set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python.exe")
|
||||
+ # else()
|
||||
+ # set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python")
|
||||
+ # endif()
|
||||
+ set(IMAGE_COMPARE_EXE "python3")
|
||||
+ # if(EXISTS "${IMAGE_COMPARE_EXE}")
|
||||
message(STATUS "venv found, testing libraries")
|
||||
execute_process(
|
||||
COMMAND "${IMAGE_COMPARE_EXE}" "${CCSD}/image_compare.py" "--status"
|
||||
@@ -77,10 +78,10 @@ if(USE_IMAGE_COMPARE_PY)
|
||||
message(STATUS "venv libraries complete")
|
||||
set(BUILD_VENV FALSE)
|
||||
endif()
|
||||
- else()
|
||||
- message(STATUS "venv not found")
|
||||
- set(BUILD_VENV TRUE)
|
||||
- endif()
|
||||
+ # else()
|
||||
+ # message(STATUS "venv not found")
|
||||
+ # set(BUILD_VENV TRUE)
|
||||
+ # endif()
|
||||
if(BUILD_VENV)
|
||||
message(STATUS "Setting up testing venv for image comparison")
|
||||
execute_process(
|
||||
|
Loading…
Reference in a new issue