diff --git a/.travis.yml b/.travis.yml index 620543516..f071e49c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,10 @@ script: - touch lib/mathlib.cpp test/testmathlib.cpp - make test -j4 CPPFLAGS=-DTEST_MATHLIB_VALUE - touch lib/mathlib.cpp test/testmathlib.cpp +# slow test in testtokenizer that is only executed on travis + - touch test/testtokenizer.cpp + - make testrunner -j4 CPPFLAGS=-DTRAVIS && ./testrunner TestTokenizer + - touch test/testtokenizer.cpp # compile cppcheck, default build - make test -j4 # compile gui diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 997065a6c..c44d38ca8 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -8342,6 +8342,9 @@ private: } void compileLimits() { +#ifdef TRAVIS + // FIXME: this test is very slow when old preprocessor is used. therefore it is only run on travis. + const char raw_code[] = "#define PTR1 (* (* (* (* (* (* (* (* (* (*\n" "#define PTR2 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1\n" "#define PTR3 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2\n" @@ -8367,6 +8370,7 @@ private: const std::string code = preprocessor.getcode(filedata, emptyString, emptyString); tokenizeAndStringify(code.c_str()); // just survive... +#endif } bool isStartOfExecutableScope(int offset, const char code[]) {