Automating Tests With CTest

The dashboard lives at the SeqAn CDash site.

For Linux and Mac OS X

Create ~/Nightly where everything will take place and check out the GitHub repository:

cd ~
mkdir Nightly
cd Nightly
git clone https://github.com/seqan/seqan seqan-src

Hint

Use the following command to clone the branch:

git clone -b develop https://github.com/seqan/seqan seqan-src

Now, get the build scripts:

cp seqan-src/misc/ctest/run_nightly.sh .
cp seqan-src/misc/ctest/Seqan_Nightly.cmake.example Seqan_Nightly.cmake
cp seqan-src/util/cmake/CTestConfig.cmake seqan-src/

Adjust the build name and site name in Seqan_Nightly.cmake. Now, test the setup by running:

chmod u+x run_nightly.sh
./run_nightly.sh

Add run_nightly.sh to your nightly cron jobs:

crontab -e

Example crontab file:

#min    hour    mday    month   wday    command
05      1       *       *       *       sh -l ${HOME}/Nightly/run_nightly.sh > /dev/null

For Windows

Create Nightly in your home directory where everything will take place and check out the trunk:

cd /D %HOME%
mkdir Nightly
cd Nightly
git clone https://github.com/seqan/seqan seqan-src

Now, get the build scripts:

copy seqan-src\misc\ctest\run_nightly.sh .
copy seqan-src\misc\ctest\Seqan_Nightly.cmake.example Seqan_Nightly.cmake
copy seqan-src\util\cmake\CTestConfig.cmake seqan-src\

Adjust the build name and site name in Seqan_Nightly.cmake. Now, test the setup by running:

run_nightly.bat

Add run_nightly.bat to nightly Scheduled Tasks of Windows (analogously to the CTest Tutorial):

  1. Open “Scheduled Tasks” from Control Panel.
  2. Select Add Scheduled Task``
  3. Select Next to select command.``
  4. Click Browse... and select \ ``run_nightly.bat.
  5. Click Next and select name and repetition date. Repetition date for Nightly dashboards should be Daily.``
  6. Click Next and select time to start the dashboard.``
  7. Click Next and select Open advanced properties... to fine tune the scheduled task.``
  8. Select Next and type password of the user.``
  9. Task is created. The Advanced Properties dialog should open.``
  10. In advanced properties, specify full command name. This is very important that you use double quotes in case you have space in your path.``
  11. Select ‘Ok, which will ask for password again.``
  12. The new task should be created.``