summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMultiProcessHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-3/+3
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-1/+1
| | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-403/+298
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* CTest: Fix regression in handling of a RUN_SERIAL test that failsBrad King2015-10-231-5/+4
| | | | | | | Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler: Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code path for cleaning up after a failed RUN_SERIAL test. This causes an infinite loop after a RUN_SERIAL test fails. Fix it and add a test.
* ctest: Optionally avoid starting tests that may exceed a given CPU loadBetsy McPhail2015-06-301-7/+117
| | | | | | | | | | | | | | Add a TestLoad setting to CTest that can be set via a new --test-load command-line option, CTEST_TEST_LOAD variable, or TEST_LOAD option to the ctest_test command. Teach cmCTestMultiProcessHandler to measure the CPU load and avoid starting tests that may take more than the spare load currently available. The expression <current_load> + <test_processors> <= <max-load> must be true to start a new test. Co-Author: Zack Galbreath <zack.galbreath@kitware.com>
* cmCTestMultiProcessHandler: Refactor RUN_SERIAL implementationZack Galbreath2015-06-301-4/+31
| | | | | | | | The original implementation of the RUN_SERIAL test property worked by having such a test consume all available processors. Instead use an explicit flag to indicate that a serial test is running. This avoids artificially inflating the number of processors a test is expected to consume.
* ctest: Add a new --repeat-until-fail optionBill Hoffman2015-03-231-1/+12
| | | | | This option tells ctest to run each test N times until the test fails or the N times have run. This is useful for finding random failing tests.
* ctest_test: Add QUIET optionZack Galbreath2015-02-231-19/+28
|
* cmStandardIncludes: Remove list include.Stephen Kelly2015-02-061-0/+1
| | | | Include it only where used.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-3/+3
|
* Replace 'foo.size() != 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | | | | | All compilers hosting CMake support the std class.
* | Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-11/+4
| |
* | Use insert instead of a loop in some cases.Stephen Kelly2015-01-111-5/+2
|/ | | | | | Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-9/+9
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* Fix a few more places to use cmsys::[io]fstream instead of std::fstream.Clinton Stimpson2014-10-041-4/+4
|
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-1/+1
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-1/+1
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-3/+4
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* CTest: fix regressions introduced by the ctest-fix-run-serial topicNils Gladitz2013-12-231-4/+83
| | | | | | The first regression resulted in endless looping due to unrun test dependencies. The second regression prioritized all tests with dependencies in serial test runs.
* CTest: prevent tests from being inserted in the cost list twiceNils Gladitz2013-10-311-1/+8
|
* CTest: restore old failed test priority in serial test runsNils Gladitz2013-10-271-3/+4
|
* CTest: fix dashboard issues associated with the ctest-fix-run-serial topicNils Gladitz2013-10-251-7/+20
|
* CTest: added comments that describe the basic test sorting approachNils Gladitz2013-10-211-0/+7
|
* CTest: removed redundant copy of test dependency setNils Gladitz2013-10-211-7/+1
|
* CTest: perform cycle test earlyNils Gladitz2013-10-191-1/+7
|
* CTest: consider previously failed tests before all othersNils Gladitz2013-10-191-15/+10
|
* CTest: prioritize tests by their depth in the dependency graphNils Gladitz2013-10-181-4/+45
|
* CTest: handle dependent and non dependent test requirements equallyNils Gladitz2013-10-171-40/+9
|
* CTest: Prevent creation of unbounded number of tests in ctest (#12904)Casey Goodlett2012-12-181-1/+6
| | | | | | Note it is still possible for CTest to start more than the number of processes specified by PARALLEL_LEVEL, but this prevents the number of tests to start from being unbounded because of overflow.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-7/+7
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Use stable_sort to preserve test order (#11877)David Cole2011-02-181-1/+1
| | | | | | Using sort results in a possibly-modified sorting when all elements are "tied" - use stable_sort instead to preserve the original ordering of tied elements.
* Support explicitly set test costs in non-parallel testing.Zach Mullen2011-01-031-11/+13
|
* CTest: Fix line-too-long style in DEPEND cycle errorBrad King2010-12-161-4/+4
|
* CTest: Fix test DEPEND cycle detectionBrad King2010-12-151-16/+21
| | | | | | | A cycle exists when the DFS returns to the root node, not just when multiple paths lead to the same node. Inspired-By: Alexander Esilevich <aesilevich@pathscale.com>
* Remove debugging message from parallel ctestZach Mullen2010-12-011-6/+0
|
* Added CTest command --print-labelsZach Mullen2010-08-311-0/+42
| | | | | | This command allows a user to quickly see the list of all available test labels. The labels are also printed in verbose show only mode, alongside their corresponding tests.
* Merge branch 'improve-test-cost-sorting'Brad King2010-07-061-57/+57
|\
| * More robust cost-based scheduling implZach Mullen2010-07-011-57/+57
| |
* | Fix cycle detection for test dependenciesZach Mullen2010-06-301-17/+12
|/
* Eliminate -Wconversion warnings.David Cole2010-06-271-2/+3
| | | | | | Change types of local variables, or casting, or re-arrange expressions to get rid of "conversion may alter value" warnings as seen on recent dashboard submissions from londinium.kitware.
* Parallel CTest hangs if serial test has dependsZach Mullen2010-06-231-1/+1
|
* Do not exit if stoptime is passed.Zach Mullen2010-06-151-0/+15
|
* Cost-based test scheduling should only be done in parallel mode.Zach Mullen2010-05-191-6/+15
|