On Sat, Sep 25, 2010 at 5:47 AM, Geoffrey Hutchison
<[email protected]> wrote:
>
> On Sep 24, 2010, at 11:32 AM, Tim Vandermeersch wrote:
>
>> Yes, I've already submitted an experimental memory check and coverage
>> run. Below is the script I used for the Experimental coverage.
>> Coverage can be included in Continuous or Nightly builds for example,
>> the CMAKE_CXX_FLAGS results in gcov files. If these are detected,
>> coverage is submitted.
>
> I'll definitely take the coverage up -- one problem I see is that your 
> coverage build doesn't specify CMAKE_BUILD_TYPE, which defaults to 
> RelWithDebInfo (i.e., '-g -O2'). This isn't great for coverage -- 
> optimization confuses debuggers and gcov.

Yes, I've changed this now. Coverage is now included in the continuous
runs on my site to stimulate improving the coverage.

There were some incorrect submitted continuous runs around the time my
cron job restarts. I now changed it to restart every 24 hours and run
only 23h50m which should hopefully fix this.

I finally managed to get make -j5 working and my new script is
attached. This is an "extended" CTest script since it doesn't use
"ctest -D Model" but calls the individual parts directly. This gives
us some more flexibility. I think the script should work on mac
without modifying anything under the commented line.

Tim

> Thanks and best regards,
> -Geoff
cmake_minimum_required(VERSION 2.2)

set(CTEST_SOURCE_DIRECTORY /home/timvdm/openbabel-cdash)
set(CTEST_BINARY_DIRECTORY /home/timvdm/openbabel-cdash/build)

set(CTEST_SITE "Manganese.timvdm")
set(CTEST_BUILD_NAME "Ubuntu 9.04, GCC 4.4.1, 64bit")

set(MAKE_OPTIONS "-j5") # Use 5 processes
set(CXX_FLAGS "-fprofile-arcs -ftest-coverage") # Needed for gcov coverage

set(COVERAGE_PROGRAM_NAMES gcov)
set(UPDATE_PROGRAM_NAMES svn)
set(MAKE_PROGRAM_NAMES make)

################################################################################

set(CTEST_PROJECT_NAME "openbabel")
# Use Debug build to get optimal coverage results
set(CTEST_BUILD_CONFIGURATION "Debug")

# Find the programs to use
find_program(CTEST_COVERAGE_COMMAND NAMES ${COVERAGE_PROGRAM_NAMES})
find_program(CTEST_UPDATE_COMMAND NAMES ${UPDATE_PROGRAM_NAMES})
find_program(CTEST_BUILD_COMMAND NAMES ${MAKE_PROGRAM_NAMES})

# Set the configure command: cmake [options] source_dir
set(CTEST_CONFIGURE_COMMAND "\"${CMAKE_EXECUTABLE_NAME}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DPYTHON_BINDINGS:BOOL=OFF")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-DCMAKE_CXX_FLAGS_DEBUG:STRING=${CXX_FLAGS}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
# Set the build command: make [options]
set(CTEST_BUILD_COMMAND "${CTEST_BUILD_COMMAND} ${MAKE_OPTIONS}")

# Empty the binary directory
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})

# Start the 24h cycle  
while (${CTEST_ELAPSED_TIME} LESS 85800) # 23h50m
  # Record the start time
  set(START_TIME ${CTEST_ELAPSED_TIME})

  # Do the actual testing...
  ctest_start(Continuous)
  ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE updated)
  if (${updated})
    # Only run when there are updates
    ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
    ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
    ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
    ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
    ctest_submit(RETURN_VALUE res)
  endif()

  # Sleep for up to 5 minutes based on the start time
  ctest_sleep(${START_TIME} 300 ${CTEST_ELAPSED_TIME})
endwhile()

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to