Below I have forwarded a message I sent to the cmake developers list
that summarizes the Contracts.PLplot test that has been recently implemented
by Brad King and that works well for me.

If you like that idea for helping out with both CMake and PLplot
testing using an automatic procedure, I strongly urge you to set up this test.

This test is configured as follows:

1. Follow the directions at
<https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst>.

which largely consist of

git clone https://gitlab.kitware.com/cmake/dashboard-scripts.git
CMakeScripts
cd CMakeScripts

2. The cmake_common.cmake script that appears in that directory
contains comments at the top with instructions to set up a testing
client. As it instructs, create a CTest script with local settings and
include cmake_common.cmake. I called that script my_dashboard.cmake,
and I attach it as a prototype for how to configure the
Contracts.PLplot for CMake. (See
<https://cmake.org/Wiki/CMake_Scripting_Of_CTest> for additional
documentation concerning how to set up CTest scripts.)

Note, you are free to specify any cmake option for the PLplot
configuration in my_dashboard.cmake.  I have chosen -DBUILD_TEST=ON
(to add builds of all the compiled examples to the usual build),
-DBUILD_DOC=ON (to add a build of the DocBook-generated
documentation). and -DBUILD_DOX_DOC=ON (to add a build of the
Doxygen-generated documentation).  I have not specified
BUILD_SHARED_LIBS or ENABLE_DYNDRIVERS so the default (ON) values are
used for those corresponding to shared libraries/dynamic devices.  But
obviously you can choose not to build anything extra and you could
also specify either -DBUILD_SHARED_LIBS=ON -DENABLE_DYNDRIVERS=OFF or
-DBUILD_SHARED_LIBS=OFF -DENABLE_DYNDRIVERS=OFF to test our other two
major build configurations (shared libraries/nondynamic devices or
static libraries/nondynamic devices). I have also chosen a particular
fixed PLplot commit to have complete testing consistency for the
latest staged version of CMake (at least until I change that specified
PLplot commit again). But you are also free to specify a non-fixed
PLplot commit (such as HEAD which should test whether the latest master
branch version of PLplot always builds on your platform with the
latest staged version of CMake).

3. Once you have created your own version of the my_dashboard.cmake
script you can test it as follows.

a. Temporarily replace
set(dashboard_model Nightly)

with

set(dashboard_model Experimental)

in the script.

b. Run the script, e.g., with

ctest -S ~/cmake/Dashboards/Scripts/CMakeScripts/my_dashboard.cmake -VV >& 
ctest.out

This should take something like half an hour (at least if you are
using ccache) to build the staged
branch version of CMake, run all ctests for that version including
the Contracts.PLplot test, and report the results of all those tests as an 
Experimental
dashboard at https://open.cdash.org/index.php?project=CMake.

4. Once that test of the Experimental mode works, then change the
script again to replace

set(dashboard_model Experimental)

with

set(dashboard_model Nightly)

and follow the directions at

<https://cmake.org/Wiki/CMake_Scripting_Of_CTest>

for setting up Cron/Scheduler to run the
script once per day.

For those with access to crontab, here is how I configured that
using the

crontab -e -u software

command (where software is the name of the login account where I run
all these tests).

# Set important environment variables.
# Set the shell to bash because there are bashisms below.
SHELL=/bin/bash
# PATH must include ccache (for build speed) and my default build of
cmake (so I # can run ctest from that version).  The rest of PATH is standard.
PATH=/usr/lib/ccache:/home/software/cmake/install/bin:~/bin:/usr/bin/:/bin

# Using env below to set DISPLAY to what is appropiate for the software account 
on raven
# allows the DISPLAY-dependent part of the PLplot configuration to work for
# that contract test for PLplot.

# Set time of command and what command is actually run using the
# following format:
# m h  dom mon dow   command
32  04   *   *   * env DISPLAY=localhost:10.0 ctest -S 
~/cmake/Dashboards/Scripts/CMakeScripts/my_dashboard.cmake -VV >& 
~/cmake/Dashboards/crontab_ctest.log

which means that script is automatically executed at 4:32 local time
each day, but obviously you can choose any time of the day that is
convenient for you.

Once automatic Nightly runs of your Ctest my_dashboard.cmake script
are implemented, then that script collects results as a Nightly
dashboard which you should be able to see for each day in the Nightly
section of <https://open.cdash.org/index.php?project=CMake>.

For the sake of encouraging widespread testing of PLplot, I hope most
of you become interested in testing CMake with a build of PLplot in
this automated way on all the platforms of interest to you.  If you
have any further questions about configuring a Contracts.PLplot test
of CMake, don't hesitate to get in touch with me.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

---------- Forwarded message ----------
Date: Thu, 9 Nov 2017 21:40:36 -0800 (PST)
From: Alan W. Irwin <ir...@beluga.phys.uvic.ca>
To: Brad King <brad.k...@kitware.com>, Ben Boeckel <ben.boec...@kitware.com>,
    cmake-develop...@cmake.org
Subject: Re: [cmake-developers] PLplot contract test

On 2017-11-08 18:00-0800 Alan W. Irwin wrote:

[...]
Changing topics back to the Nightly case where the job is started in a
crontab environment rather than on the normal desktop command line as
above, further research indicates it is possible to set DISPLAY for
such environments (assuming that DISPLAY exists at the time the
crontab job fires as is typical for my case).  So I am going to try
that to see if that change plus the above setting of XAUTHORITY solves
the Nightly issue as well.

Thanks to that crontab change to define the DISPLAY environment
variable, all is now well with the Nightly case, see
<https://open.cdash.org/testDetails.php?test=598968882&build=5135648>.

So that appears to be the end of the configuration issues with the
Contracts.PLplot test, and my thanks to Brad for implementing this
test in the first place, and both Brad and Ben for some key help with
my configuration of this test.

So for others here that might be interested, Contracts.PLplot tests a
build of the stage/master/nightly/latest branch of CMake by using
ExternalProject_Add to git checkout a specified version of PLplot and to configure, build, and install that version with user control of the
PLplot version selected for the test and the CMake options used to
build PLplot.  So this test is good from the PLplot perspective
because it makes it more difficult for some new CMake development to
cause PLplot developers problems without us knowing it long in advance
of CMake releases.  And it is also good from the CMake testing
perspective since it is a test that exercises a lot of different CMake
functionality in a realistic way (i.e., as used in a rather complex
build system, warts and all).  Additional notes are (1) because of the
relatively small size of the PLplot project (despite its build-system
complexity) this test adds less than ~30 per cent to the overall cost
of building and testing CMake, and (2) this test should work on
essentially all platforms (the build of PLplot is known to work on at
least Linux, Mac OS X, Cygwin, MinGW-w64/MSYS2, and MSVC). So if
anyone else is interested in trying this test on their favorite
platform(s), feel free to contact me for help with configuring it and
overcoming any PLplot build failures in the unlikely event of you
encountering those.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Attachment: my_dashboard.cmake.gz
Description: compressed dashboard script which configures the Contracts.PLplot test of CMake

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to