mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-20 22:18:30 +00:00
A project saved before a printer or process option existed has no value for it. The GUI takes such keys from the project's system preset; the CLI left them at the option default, so e.g. extruder_clearance_dist_to_rod sliced as 40 instead of the P1S's 33. The CLI now resolves the project's system printer and process presets by name and copies the keys the project lacks, skipping preset bookkeeping, print-host keys, the extruder variant layout and keys the legacy handler drops. PresetBundle::resolve_system_preset finds the vendor through its manifest or preset cache, so it also works in release builds, which ship vendors as caches only.
26 lines
1.1 KiB
CMake
26 lines
1.1 KiB
CMake
# Runs the real orca-slicer binary, so it needs the built app and resources/, not just build/tests.
|
|
# The CI unit-test job only receives build/tests, so the test carries the RequiresApp label that
|
|
# scripts/run_unit_tests.sh excludes. Run it with `ctest -C Release -L RequiresApp`. It also exits 77
|
|
# (skipped) when the binary is missing.
|
|
|
|
find_program(ORCA_CLI_TEST_PYTHON NAMES python3)
|
|
if (NOT ORCA_CLI_TEST_PYTHON)
|
|
message(STATUS "python3 not found, not registering the CLI tests")
|
|
return()
|
|
endif ()
|
|
|
|
add_test(NAME cli_strict_mode
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_strict.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON})
|
|
set_tests_properties(cli_strict_mode PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 900)
|
|
|
|
add_test(NAME cli_project_missing_keys
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_project_missing_keys.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON}
|
|
${CMAKE_SOURCE_DIR}/resources/profiles/BBL)
|
|
set_tests_properties(cli_project_missing_keys PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 900)
|