-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
how_to_test
This wiki page describes how to build and run tests on Linux. It should eventually provide guidance on how to add tests for a new feature.
Can be built with the -t flag for build_linux.sh:
build_linux.sh -t(or -ter or -stb etc).
When running build_linux.sh with -t, make sure you always include the -e or -b flag if you built the binary with them, otherwise you'll rebuild all of OrcaSlicer again before the tests are ready.
Test binaries will then appear under build/tests or build-dbginfo/tests or build-dbg/tests. As of this writing, not all tests will be built.
For rebuilding after changes, you can look into build_linux.sh for the cmake command which triggers the build and adapt it to running independently. You'll be able to use something like:
# Obviously only use the appropriate one
BUILD_CONFIG=Release
BUILD_CONFIG=RelWithDebInfo
cd $BUILD_DIR # build or build-dbginfo probably
cmake --build . --config $BUILD_CONFIG --target tests/all
# or
cmake --build . --config $BUILD_CONFIG --target libslic3r_tests
# etcIf you change any CMakeLists.txt file, you'll need to rerun the configuration generation first. Change to the build directory and run cmake .. hopefully works without destroying the cache. Rerunning build_linux.sh -t{eb} is the most comprehensive way, but then everything has to be rebuilt. You'll need this if you added a new cpp file, for example.
cd $BUILD_DIR # build or build-dbginfo probably
ctest --test-dir testscd $BUILD_DIR # build or build-dbginfo probably
ctest --test-dir tests/slic3rutilsWIP...
Warning
!! incomplete, possibly inaccurate, being updated with new info !!
Refers to the entire application. The whole view, file loading, project saving and loading is all managed by this class. This class contains members for the model viewer, the sidebar, gcode viewer and everything else.
This is relating the the sidebar in the application window

The drop down menus where you can see and select presets

Refers to the various windows with settings. e.g. the Popup to edit printer or filament preset. Also the section to edit process preset and the object list. These 4 are managed by TabPrinter, TabFilament, TabPrint and TabPrintModel respectively.
