ament / ament_cmake

Supporting CMake packages for working with ament
Apache License 2.0
100 stars 124 forks source link

should probably not be making CTestConfiguration.ini file #272

Open rotu opened 4 years ago

rotu commented 4 years ago

Ament_cmake configures DartConfiguration.tcl.ini with a lot of missing information. This results in a "CTestConfiguration.ini" file with a misleading header command containing almost entirely unconfigured boilerplate.

This file is documented as being created by CMake:

In build trees generated by CMake, this configuration file is generated by the CTest module if included by the project. The module uses variables to obtain a value for each setting as documented with the settings below.

We probably should use that normal creation mechanism, which may even use the more succinct CTestScript.cmake.in template.

An example of the file generated:

# This file is configured by CMake automatically as DartConfiguration.tcl
# If you choose not to use CMake, this file may be hand configured, by
# filling in the required variables.

# Configuration directories and files
SourceDirectory: /opt/ros/master/src/ros2/rcl_interfaces/action_msgs
BuildDirectory: /opt/ros/master/build/action_msgs

# Where to place the cost data store
CostDataFile: 

# Site is something like machine.domain, i.e. pragmatic.crd
Site: Rhea

# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++
BuildName: 

# Subprojects
LabelsForSubprojects: 

# Submission information
SubmitURL: 

# Dashboard start time
NightlyStartTime: 

# Commands for the build/test/submit cycle
ConfigureCommand: "/usr/bin/cmake" "/opt/ros/master/src/ros2/rcl_interfaces/action_msgs"
MakeCommand: 
DefaultCTestConfigurationType: 

# version control
UpdateVersionOnly: 

# CVS options
# Default is "-d -P -A"
CVSCommand: 
CVSUpdateOptions: 

# Subversion options
SVNCommand: 
SVNOptions: 
SVNUpdateOptions: 

# Git options
GITCommand: 
GITInitSubmodules: 
GITUpdateOptions: 
GITUpdateCustom: 

# Perforce options
P4Command: 
P4Client: 
P4Options: 
P4UpdateOptions: 
P4UpdateCustom: 

# Generic update command
UpdateCommand: 
UpdateOptions: 
UpdateType: 

# Compiler info
Compiler: /usr/lib/ccache/clang++
CompilerVersion: 11.0.0

# Dynamic analysis (MemCheck)
PurifyCommand: 
ValgrindCommand: 
ValgrindCommandOptions: 
MemoryCheckType: 
MemoryCheckSanitizerOptions: 
MemoryCheckCommand: 
MemoryCheckCommandOptions: 
MemoryCheckSuppressionFile: 

# Coverage
CoverageCommand: 
CoverageExtraFlags: 

# Cluster commands
SlurmBatchCommand: 
SlurmRunCommand: 

# Testing options
# TimeOut is the amount of time in seconds to wait for processes
# to complete during testing.  After TimeOut seconds, the
# process will be summarily terminated.
# Currently set to 25 minutes
TimeOut: 

# During parallel testing CTest will not start a new test if doing
# so would cause the system load to exceed this value.
TestLoad: 

UseLaunchers: 
CurlOptions: 
# warning, if you add new options here that have to do with submit,
# you have to update cmCTestSubmitCommand.cxx

# For CTest submissions that timeout, these options
# specify behavior for retrying the submission
CTestSubmitRetryDelay: 
CTestSubmitRetryCount: 
dirk-thomas commented 4 years ago

The currently generated file is required for the tests to generate the desired XML result file interpreted by Jenkins as well as colcon-cmake. Therefore I don't think it can be just removed without anything else in place to maintain the desired behavior.

Please consider proposing concrete changes and even better contribute a pull request to make this work well in other cases.