mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-27 15:49:52 -05:00
When the CLI slices a project for a printer with a different bed, it matches each object to a plate by position and then moves each plate's objects onto the new plate grid. The plates got the new bed's shape before that matching, while they were still laid out on the old grid. On a 256 mm project's grid, a 340 mm plate 1 overlaps plate 2 by 32.8 mm. An object near plate 2's left edge joined plate 1, moved with it into the gap between plates, and was left out of the slice with exit code 0. On a smaller bed, an object near a plate's right edge matched no plate and was left out the same way. Match objects on the bed the project was saved with, then apply the new bed's shape and match them again on the new grid. Fixes #17741
88 lines
3.7 KiB
CMake
88 lines
3.7 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})
|
|
add_test(NAME cli_empty_project_config
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_empty_project_config.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON} ${CMAKE_SOURCE_DIR})
|
|
set_tests_properties(cli_empty_project_config PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 300)
|
|
|
|
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)
|
|
|
|
add_test(NAME cli_arrange_rotations
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_arrange_rotations.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON}
|
|
${CMAKE_SOURCE_DIR}/resources/profiles/BBL)
|
|
set_tests_properties(cli_arrange_rotations PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 900)
|
|
|
|
add_test(NAME cli_no_suitable_objects
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_no_suitable_objects.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON}
|
|
${CMAKE_SOURCE_DIR}/resources/profiles/BBL)
|
|
set_tests_properties(cli_no_suitable_objects PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 900)
|
|
|
|
add_test(NAME cli_filament_colour_count
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_filament_colour_count.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON}
|
|
${CMAKE_SOURCE_DIR}/resources/profiles/BBL)
|
|
set_tests_properties(cli_filament_colour_count PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 300)
|
|
|
|
add_test(NAME cli_load_filaments_count
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_load_filaments_count.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON}
|
|
${CMAKE_SOURCE_DIR}/resources/profiles/BBL)
|
|
set_tests_properties(cli_load_filaments_count PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 300)
|
|
|
|
add_test(NAME cli_malformed_input
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_malformed_input.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON})
|
|
set_tests_properties(cli_malformed_input PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 900)
|
|
|
|
add_test(NAME cli_nozzle_volume_type
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_nozzle_volume_type.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON}
|
|
${CMAKE_SOURCE_DIR}/resources/profiles)
|
|
set_tests_properties(cli_nozzle_volume_type PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 900)
|
|
|
|
add_test(NAME cli_retarget_plate_grid
|
|
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test_cli_retarget_plate_grid.sh $<TARGET_FILE:OrcaSlicer> ${ORCA_CLI_TEST_PYTHON}
|
|
${CMAKE_SOURCE_DIR}/resources/profiles/BBL)
|
|
set_tests_properties(cli_retarget_plate_grid PROPERTIES
|
|
LABELS "CLI;RequiresApp"
|
|
SKIP_RETURN_CODE 77
|
|
TIMEOUT 900)
|