ITK/Release 4/Testing On Demand/Tutorial: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
 
(17 intermediate revisions by 2 users not shown)
Line 3: Line 3:
= Overview =
= Overview =


Two steps are required to make your computer available to the InsightToolkit project for testing.
There are two steps for setting up an on-demand CDash test.  If you want make your computer available to the InsightToolkit project for testing, just complete step 1.  Step 2 is only available to CDash administrators.


# [[#How to Setup a Client| Configure your client]]
# [[#How to Setup a Client| Configure your client]]
Line 10: Line 10:
= How to Setup a Client =
= How to Setup a Client =


A cdash@home client is a computer that is donating time to CDash.  It makes itself available to run testing tasks that other customers, such as [[ITK/Gerrit| the Gerrit review system]], may request from CDash.
A cdash@home client is a computer that is donating time to CDash.  It makes itself available to run testing tasks, such as builds for the [[ITK/Gerrit| the Gerrit review system]], that may be requested by CDash.


== XML Description ==
== XML Description ==
Line 16: Line 16:
Place an XML description of your client machine, whose name is perhaps awesomebox, in an XML file, e.g. ''awesomebox.cdash.xml''.
Place an XML description of your client machine, whose name is perhaps awesomebox, in an XML file, e.g. ''awesomebox.cdash.xml''.


  <?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
  <cdash>
<cdash>
    <system>
  <system>
      <platform>Linux</platform>
    <platform>Linux</platform>
      <version>Ubuntu</version>
    <version>Ubuntu</version>
      <bits>64</bits>
    <bits>64</bits>
      <basedirectory>/home/ibanez/Dashboards/cdashclient_workspace/</basedirectory>
    <basedirectory>/home/ibanez/Dashboards/cdashclient_workspace/</basedirectory>
    </system>
  </system>
    <compiler>
  <compiler>
      <name>gcc</name>
    <name>gcc</name>
      <version>4.4.3</version>
    <version>4.4.3</version>
      <generator>Unix Makefiles</generator>
    <generator>Unix Makefiles</generator>
    </compiler>
  </compiler>
    <cmake>
  <cmake>
      <version>2.8</version>
    <version>2.8</version>
      <path>/home/ibanez/local/bin/cmake</path>
    <path>/home/ibanez/local/bin/cmake</path>
    </cmake>
  </cmake>
    <program>
  <program>
      <name>git</name>
    <name>git</name>
      <version>1.7.0.4</version>
    <version>1.7.0.4</version>
      <path>/usr/bin/git</path>
    <path>/usr/bin/git</path>
    </program>
  </program>
   </cdash>
   <allowedproject>Insight</allowedproject>
</cdash>
 
Valid values for the ''cdash/system/platform'' element and the ''cdash/system/version'' element can be observed here:
[https://www.kitware.com/svn/CDash/trunk/models/clientos.php Client OS description]


== CTest script ==
== CTest script ==
Line 52: Line 56:
  set(CDASH_TEMP_DIRECTORY "${_thisdir}/workspace/tmp")
  set(CDASH_TEMP_DIRECTORY "${_thisdir}/workspace/tmp")
  set(CTEST_EXECUTABLE "/usr/bin/ctest")
  set(CTEST_EXECUTABLE "/usr/bin/ctest")
  set(CTEST_DROP_SITE "www.cdash.org")
  set(CTEST_DROP_SITE "open.cdash.org")
  set(CTEST_DROP_URL "/CDash/submit.php")
  set(CTEST_DROP_URL "/submit.php")
  set(CDASH_LOOP_DURATION 64800) # Available for 18 hours / day
  set(CDASH_LOOP_DURATION 64800) # Available for 18 hours / day
  # Now include the common setup for cdash
  # Now include the common setup for cdash
  include(cdash_client_common.cmake)
  include(cdash_client_common.ctest)


== Common Script ==
== Common Script ==
Line 62: Line 66:
And finally, you need to put in the same directory the common script:
And finally, you need to put in the same directory the common script:


* [[https://www.kitware.com/svn/CDash/trunk/scripts/cdash_client_common.ctest cdash_client_common.ctest]]
* [https://www.kitware.com/svn/CDash/trunk/scripts/cdash_client_common.ctest cdash_client_common.ctest]


that is included at the bottom of the client script.
that is included at the bottom of the client script.
Line 70: Line 74:
you run the ctest script the usual way with CTest
you run the ctest script the usual way with CTest


   ctest  -S   macondo.kitware.ctest  -V
   ctest  -S awesomebox.ctest  -V


The system will reply with a message similar to
The system will reply with a message similar to
Line 78: Line 82:
   Submit files (using http)
   Submit files (using http)
     Using HTTP submit method
     Using HTTP submit method
     Drop site:http://www.cdash.org/CDash/submit.php?sitename=macondo.kitware&systemname=Ubuntu-64bits&submitinfo=1
     Drop site:http://open.cdash.org/submit.php?sitename=awesomebox&systemname=Ubuntu-64bits&submitinfo=1
     Uploaded: /home/ibanez/Dashboards/cdashclient/cdash-home/macondo.kitware.cdash.xml
     Uploaded: /home/ibanez/Dashboards/cdashclient/cdash-home/awesomebox.cdash.xml
     Submission successful
     Submission successful
   SiteId=13
   SiteId=13
Line 94: Line 98:
== Login into CDash ==
== Login into CDash ==


* Log into a Dashboard project
Go to the CDash page of your administrator account
* Go to the CDash page of your account
* http://open.cdash.org/user.php
** For example
*** http://www.cdash.org/CDash/user.php


== Select the Scheduling Icon ==
== Select the Scheduling Icon ==
Line 108: Line 110:
* This will show the available machines and their platform features.
* This will show the available machines and their platform features.
* The "Schedule Build" icon is available only to CDash users whose project role is "project administrator."
* The "Schedule Build" icon is available only to CDash users whose project role is "project administrator."
* If you still don't see it as Project Administrator, make sure the [http://public.kitware.com/Wiki/CDash:Build_Management $CDASH_MANAGE_CLIENTS variable is '1'] in your cdash/config.php.





Latest revision as of 04:43, 31 August 2014

Overview

There are two steps for setting up an on-demand CDash test. If you want make your computer available to the InsightToolkit project for testing, just complete step 1. Step 2 is only available to CDash administrators.

  1. Configure your client
  2. Tell the CDash server to use your client

How to Setup a Client

A cdash@home client is a computer that is donating time to CDash. It makes itself available to run testing tasks, such as builds for the the Gerrit review system, that may be requested by CDash.

XML Description

Place an XML description of your client machine, whose name is perhaps awesomebox, in an XML file, e.g. awesomebox.cdash.xml.

<?xml version="1.0" encoding="UTF-8"?>
<cdash>
  <system>
    <platform>Linux</platform>
    <version>Ubuntu</version>
    <bits>64</bits>
    <basedirectory>/home/ibanez/Dashboards/cdashclient_workspace/</basedirectory>
  </system>
  <compiler>
    <name>gcc</name>
    <version>4.4.3</version>
    <generator>Unix Makefiles</generator>
  </compiler>
  <cmake>
    <version>2.8</version>
    <path>/home/ibanez/local/bin/cmake</path>
  </cmake>
  <program>
    <name>git</name>
    <version>1.7.0.4</version>
    <path>/usr/bin/git</path>
  </program>
  <allowedproject>Insight</allowedproject>
</cdash>

Valid values for the cdash/system/platform element and the cdash/system/version element can be observed here: Client OS description

CTest script

A CTest script to advertise your availability to the CDash server. Pit this in a file such as awesomebox.ctest.

# These variables define the system and should be set
# In the future CTest might be able to determine this automatically
set(CDASH_SITENAME "awesomebox")
set(CDASH_SYSTEMNAME "Ubuntu-64bits")
get_filename_component(_thisdir "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(CDASH_SITE_CONFIG_FILE "${_thisdir}/awesomebox.cdash.xml")
set(CDASH_TEMP_DIRECTORY "${_thisdir}/workspace/tmp")
set(CTEST_EXECUTABLE "/usr/bin/ctest")
set(CTEST_DROP_SITE "open.cdash.org")
set(CTEST_DROP_URL "/submit.php")
set(CDASH_LOOP_DURATION 64800) # Available for 18 hours / day
# Now include the common setup for cdash
include(cdash_client_common.ctest)

Common Script

And finally, you need to put in the same directory the common script:

that is included at the bottom of the client script.

Run It

you run the ctest script the usual way with CTest

 ctest   -S  awesomebox.ctest   -V

The system will reply with a message similar to

 Cannot create directory /Testing/Temporary
 Cannot create log file: LastSubmit.log
 Submit files (using http)
    Using HTTP submit method
    Drop site:http://open.cdash.org/submit.php?sitename=awesomebox&systemname=Ubuntu-64bits&submitinfo=1
    Uploaded: /home/ibanez/Dashboards/cdashclient/cdash-home/awesomebox.cdash.xml
    Submission successful
 SiteId=13
 2: Nothing to do...
 22: Nothing to do...
 ...

The client will ping the server every 30 seconds (this value may change in the future) to check if the server has any new tasks for the client.

How to Schedule a Testing Task

In order to schedule a testing task in CDash you should execute the following steps:

Login into CDash

Go to the CDash page of your administrator account

Select the Scheduling Icon

  • Click on the icon of a Floppy disk with a Gear on top
    • Marked as "Schedule Build"

ITK-testing-on-demand.png

  • This will show the available machines and their platform features.
  • The "Schedule Build" icon is available only to CDash users whose project role is "project administrator."
  • If you still don't see it as Project Administrator, make sure the $CDASH_MANAGE_CLIENTS variable is '1' in your cdash/config.php.


The top of the web interface looks like:

ITK-testing-on-demand-02.png

and the bottom of the same page looks like:

ITK-testsing-on-demand-03.png

Select a Client

Select a client or clients by clicking on the

  • Architecture list
  • Compiler list

and finally going to the bottom of the interface and clicking on the "Schedule" button.