[Cdash] Dashboard view only shows last build with APPEND, but build page shows both

David Cole david.cole at kitware.com
Sat Aug 21 13:43:55 EDT 2010


I've reproduced this with the script below. Just run it with "ctest -S
DashboardScript.cmake -VV" and observe the results.

I polluted the Experimental section of the gccxml dashboard as proof of the
problem. (And because I know that's a low traffic dashboard page, and the
people who look at it won't mind me polluting it temporarily to help solve
this problem...) :-)

There are build errors listed here:
http://www.cdash.org/CDash/viewBuildError.php?buildid=699760

And here:
http://www.cdash.org/CDash/buildSummary.php?buildid=699760

Even though the top level page says "0" total errors for the "
build2-SmallAndFast" build.
http://www.cdash.org/CDash/index.php?project=gccxml&date=2010-08-21 (look in
the Experimental section)

This below ctest script is somewhat funky, but completely self-contained.
You can try it, too, if you'd like....

We'll investigate and figure this out. Clearly the top level page just needs
to use the same query as the buildSummary page to get the correct number of
build errors to display.


Thanks,
David Cole


Script:

# Run this with "ctest -S DashboardScript.cmake [-VV]"

# Tested with ctest version 2.8.2

#

set(root_dir "${CTEST_SCRIPT_DIRECTORY}/dashboard")

#

# Generates source and build trees:

#   ${root_dir}/source

#   ${root_dir}/build1

#   ${root_dir}/build2


# Choose a CDash server and project to submit to:

# (Submit to localhost CDash or *any* available CDash server)

#

set(CTEST_PROJECT_NAME "gccxml")

set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

set(CTEST_DROP_METHOD "http")

set(CTEST_DROP_SITE "www.cdash.org")

set(CTEST_DROP_LOCATION "/CDash/submit.php?project=${CTEST_PROJECT_NAME}")

set(CTEST_DROP_SITE_CDASH TRUE)


# If running on a machine that has a localhost CDash, you can use these

# instead of polluting the gccxml dashboard:

#set(CTEST_PROJECT_NAME "TestCompressionExample") # one project in the CDash
test suite

#set(CTEST_DROP_SITE "localhost")

#set(CTEST_DROP_LOCATION "/CDash/submit.php?project=${CTEST_PROJECT_NAME}")


# Choose a generator and site to use for running all the dashboards below:

#

if(UNIX)

  set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

elseif(WIN32)

  set(CTEST_CMAKE_GENERATOR "NMake Makefiles")

else()

  message(FATAL_ERROR "please add script code to choose a CMake generator")

endif()


set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")

site_name(CTEST_SITE)


# Generate a source tree (write a CMakeLists file).

#

# Running a build against this generated CMakeLists file will simply

# download and extract *another* source tree. Just set url to a *.tgz file.

#

# Run the first dashboard using this generated CMakeLists file to download
the

# "real" source tree. Then run the second dashboard against that tree.

#

set(name "SmallAndFast")

set(url "
http://cmake.org/gitweb?p=cmake.git;a=snapshot;h=77afd489f574f3df063f014be6d4f9ec1722f770;sf=tgz
")

#set(name "TutorialStep7")

#set(url "
http://cmake.org/gitweb?p=cmake.git;a=snapshot;h=a992c81090ad7492039a8e6ac551051896ab9c8a;sf=tgz
")


file(WRITE "${root_dir}/source/CMakeLists.txt" "

cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR)

project(${CTEST_PROJECT_NAME} NONE)


include(ExternalProject)


if(NOT EXISTS \"\${CMAKE_CURRENT_BINARY_DIR}/${name}.tgz\")

  message(STATUS \"[before DOWNLOAD ${name}.tgz]\")

  file(DOWNLOAD

    \"${url}\"

    \"\${CMAKE_CURRENT_BINARY_DIR}/${name}.tgz\"

    SHOW_PROGRESS

    )

  message(STATUS \"[after DOWNLOAD]\")

endif()


ExternalProject_Add(${name}

  URL \"\${CMAKE_CURRENT_BINARY_DIR}/${name}.tgz\"

  CONFIGURE_COMMAND \"\"

  BUILD_COMMAND \"\"

  INSTALL_COMMAND \"\"

  )

")


# Run a dashboard using the above generated source tree...

# Running that dashboard will download and extract another source tree

# for us to run another dashboard against.

#

set(CTEST_BINARY_DIRECTORY "${root_dir}/build1")

set(CTEST_BUILD_NAME "build1-Extract${name}")

set(CTEST_SOURCE_DIRECTORY "${root_dir}/source")


ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})

ctest_start("Experimental")

ctest_configure()

ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})

ctest_build()

ctest_submit()


# Now run another dashboard using the source tree extracted during

# the run of dashboard #1...

#

set(CTEST_BINARY_DIRECTORY "${root_dir}/build2")

set(CTEST_BUILD_NAME "build2-${name}")

set(CTEST_SOURCE_DIRECTORY "${root_dir}/build1/${name}-prefix/src/${name}")


ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})

ctest_start("Experimental")


# configure to cause a build error

# (this configure option works with the SmallAndFast project -- if you
change

# the *.tar.gz file above, this won't make sense anymore...)

set(cfg_options -DSAF_INTENTIONAL_COMPILE_ERROR:BOOL=ON)

ctest_configure(OPTIONS "${cfg_options}")


ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})

ctest_build()

ctest_test()

ctest_submit()


# same dashboard -- re-configure to eliminate the build error and submit

# *just* the additional Build.xml file

message("sleeping for 30 seconds")

ctest_sleep(30) # while it's sleeping, you can refresh your browser and go
view the build errors in CDash

message("continuing")

set(cfg_options -DSAF_INTENTIONAL_COMPILE_ERROR:BOOL=OFF)

ctest_configure(OPTIONS "${cfg_options}")

ctest_build(APPEND)

ctest_submit(PARTS build)

#

# Now the build errors submitted above have *apparently* been clobbered by
this second submit

# Interestingly, though, if you click on the "0" build errors, the previous
build errors do

# still show up... So they're not clobbered so much as masked by a
misleading summary "0" on

# the top page...






On Fri, Aug 20, 2010 at 12:06 AM, O'Shea, David <
OShea.D at emsglobaltracking.com> wrote:

>  Hi David,
>
>
>  ------------------------------
> *From:* David Cole [mailto:david.cole at kitware.com]
> *Sent:* Thursday, 19 August 2010 9:00 PM
>
> *To:* O'Shea, David
> *Cc:* cdash at public.kitware.com
> *Subject:* Re: [Cdash] Dashboard view only shows last build with APPEND,
> but build page shows both
>
> On Wed, Aug 18, 2010 at 1:44 AM, O'Shea, David <
> OShea.D at emsglobaltracking.com> wrote:
>
>>  Hi David,
>>
>> Thanks, we have installed the latest version from Subversion but the issue
>> doesn't appear to have been fixed - I still see the same behaviour as
>> before.
>>
>> By the way, I assume the fix you're referring to is revision 2579/issue
>> #10975?
>>
>> As you can see from the comments in the CTest script snippet my original
>> post, I tried various combinations of "APPEND" options.  I've tried a few of
>> them again.  What exactly is actually the "correct" way of doing this?
>> Should the following work?
>>
>>  >>>
>> ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
>> ctest_start("Experimental")
>> ctest_configure(OPTIONS [...])
>> ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
>> ctest_build()
>> ctest_test()
>> ctest_coverage()
>>
>> set(CTEST_NOTES_FILES
>>     [...])
>>
>> ctest_submit()
>>
>>  ctest_build(TARGET "doc"
>>             APPEND)
>> ctest_submit(PARTS Build)
>> <<<
>>
>
> Yes. I think this should work exactly as you've written it. If it does not,
> we should add a test to the CDash test suite and verify that errors and
> warnings from the two build steps accumulate rather than wipe each other
> out.
>
> I would try using "APPEND" in the first ctest_build call, too, but I don't
> think that should have an effect. It should work as is.
>
> I 'm pretty certain I tried that in amongst all the other combinations!
>
>  I'm assuming you're using up to date ctest... 2.8.2?
>
>
> $ /c/Program\ Files/CMake\ 2.8/bin/ctest --version
> ctest version 2.8.2
>
> Thanks!
> David
>
> ----------------------------------------------
> David O'Shea
> Senior Engineer
> EMS SATCOM Pacific Pty Ltd.
>
> OShea.D at emsglobaltracking.com
> www.emsglobaltracking.com
> T: +61 8 8260 8187
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cdash/attachments/20100821/514790b9/attachment-0001.htm>


More information about the Cdash mailing list