-{section: Testing Condor On Linux} +{section: Testing HTCondor On Linux} -batch_test.pl runs the test suite . It can start up its own personal HTCondor and use that for testing. The tests may also start their own personal Condors. +Starting in 8.9.3, HTCondor tests can be invoked using the =ctest= framework. -{subsection: Running Tests from HTCondor Source Tree} +{subsection: Building HTCondor} + +This is a simple primer for building HTCondor; refer to BuildingHtcondorOnLinux for more in-depth build instructions. + +*NOTE*: Prior to 8.9.3, builds must be done IN-SOURCE if you want to run tests. Starting in 8.9.3, out-of-source builds are acceptable (preferable!). + +1: Get the source code from any of the following locations: +{code} +git clone https://github.com/htcondor/htcondor.git +# Source code can also be obtained from tarballs on HTCondor's website +{endcode} + + +2: Compiling the code and tests.(See {wiki: BuildingHtcondorOnLinux} + for more details on building the code and pre-requisites) +{code} +cd htcondor # change directory to the root of source tree +./configure_uw +make install +{endcode} + +Prior to 8.9.3, =make tests= is also required. + +{subsection: Running ctest} + +From the build directory, run: + +{code} +ctest +{endcode} + +That's it! The tests should be idempotent - it should be safe to re-run them as many times as desired. + +*NOTE*: Some tests failures cause a personal =condor_pool= to be leaked. If you have issues re-running the tests, try doing =killall condor_master=. + +Some =ctest= tips and tricks: + +{code} +# Run 20 test cases in parallel: +ctest -j 20 +# Run all tests labelled `quick` (a bit of a misnomer in HTCondor...) +ctest -L quick +# Run all tests matching the regex `cmr`: +ctest -R cmr +{endcode} + +{subsection: Running Tests Prior to 8.9.3} + +For HTCondor 8.9.2 and prior, running tests require you to invoke the various perl scripts driectly. 1: Get the source code from any of the following locations: {code}