mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-24 06:20:30 -05:00
The CLI now sets one nozzle_volume_type per nozzle, as the GUI does. A command-line value wins, then the project's own types, then the printer's defaults. A short list repeats its first entry and a long one is cut to the nozzle count. The sized list is written to the project config and over the command-line value, so the export has one type per nozzle, and reopening it in the CLI keeps the flush matrix the user set. The flush volume setup reads the sized types instead of indexing a short command-line list past its end. Adds the cli_nozzle_volume_type test.
80 lines
3.4 KiB
CMake
80 lines
3.4 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)
|