Commit 3aa26c98 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Implement LIMIT_LONG_TESTS cmake option to limit tests on CI

parent 49fc059e
......@@ -182,6 +182,10 @@ add_feature_info("Foundation Build" FOUNDATION_BUILD "A Foundation build is a bi
option(KRITA_ENABLE_BROKEN_TESTS "Enable tests that are marked as broken" OFF)
add_feature_info("Enable Broken Tests" KRITA_ENABLE_BROKEN_TESTS "Runs broken test when \"make test\" is invoked (use -DKRITA_ENABLE_BROKEN_TESTS=ON to enable).")
option(LIMIT_LONG_TESTS "Run long running unittests in a limited quick mode" ON)
configure_file(config-limit-long-tests.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-limit-long-tests.h)
add_feature_info("Limit long tests" LIMIT_LONG_TESTS "Run long running unittests in a limited quick mode")
option(ENABLE_PYTHON_2 "Enables the compiler to look for Python 2.7 instead of Python 3. Some packaged scripts are not compatible with Python 2 and this should only be used if you really have to use 2.7." OFF)
option(BUILD_KRITA_QT_DESIGNER_PLUGINS "Build Qt Designer plugins for Krita widgets" OFF)
......
/* config-limit-long-tests.h. Generated by cmake from config-limit-long-tests.h.cmake */
/* Define if you want long tests to run in a limited quick mode */
#cmakedefine LIMIT_LONG_TESTS 1
......@@ -29,6 +29,17 @@
#include "kis_cubic_curve.h"
#include "krita_utils.h"
#include "config-limit-long-tests.h"
#ifdef LIMIT_LONG_TESTS
#define RATIO_STEP 50
#define FADE_STEP 25
#else /* LIMIT_LONG_TESTS */
#define RATIO_STEP 20
#define FADE_STEP 5
#endif /* LIMIT_LONG_TESTS */
enum MaskType {
DEFAULT, CIRC_GAUSS, CIRC_SOFT, RECT_GAUSS, RECT_SOFT, STAMP
};
......@@ -79,9 +90,9 @@ public:
static void exahustiveTest(QRect bounds, MaskType type) {
// Exahustive test
for (size_t i = 0; i <= 100; i += 5){
for (size_t j = 0; j <= 100; j += 5){
for (size_t k = 0; k <= 100; k += 20){
for (size_t i = 0; i <= 100; i += FADE_STEP){
for (size_t j = 0; j <= 100; j += FADE_STEP){
for (size_t k = 0; k <= 100; k += RATIO_STEP){
switch (type) {
case CIRC_GAUSS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment