[CDash] Revision status API endpoint returns empty list
Elvis Stansvik
elvstone at gmail.com
Sun Apr 5 11:03:20 UTC 2020
Nevermind, it was a simple matter of adding a missing
set(CTEST_GIT_COMMAND git)
set(CTEST_UPDATE_VERSION_ONLY TRUE)
and
ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
to our CTestScript.cmake. The latter was the crucial part, otherwise
no Update.xml was generated.
BTW the set(CTEST_GIT_COMMAND git) was necessary, or I would get a
Cannot find UpdateCommand or GITCommand configuration key.
error. Anyone know why it can't auto-detect the Git command? It has
obviously detected that the repo type is Git, so shouldn't it just
auto-detect the Git command at that point?
I notice that e.g. CMake itself does [1]
set(CTEST_UPDATE_COMMAND "@UPDATE_COMMAND@")
set(CTEST_UPDATE_OPTIONS "@UPDATE_OPTIONS@")
in their Templates/CTestScript.cmake.in to set CTEST_UPDATE_{COMMAND,
OPTIONS} variables from the ones detected in Modules/CTest.cmake, but
I'm hesitant to do the same as that would require us to turn our
CTestScript.cmake into a configure_file()-configured template to get
access to those variables, and that will be very awkward as you'd have
to run cmake prior to running ctest -VV CTestScript.cmake to confgure
the script :/
Elvis
[1] https://github.com/Kitware/CMake/blob/master/Templates/CTestScript.cmake.in#L11-L12
Den sön 5 apr. 2020 kl 11:59 skrev Elvis Stansvik <elvstone at gmail.com>:
>
> By looking at the code, I see that the revision of a build is supposed
> to be stored in the buildupdate table in the database, but that table
> is empty for us:
>
> mysql> select * from buildupdate;
> Empty set (0.00 sec)
>
> mysql>
>
> So I guess there's something we need to do to populate it when
> submitting builds.
>
> Elvis
>
> Den sön 5 apr. 2020 kl 11:45 skrev Elvis Stansvik <elvstone at gmail.com>:
> >
> > Den sön 5 apr. 2020 kl 11:43 skrev Elvis Stansvik <elvstone at gmail.com>:
> > >
> > > Hi all,
> > >
> > > I'm trying to use the "revision status" API endpoint described at
> > > https://www.paraview.org/Wiki/CDash:API#Revision_Status , but it
> > > returns an empty list ("[]"):
> > >
> > > estan at edison:~$ curl -X POST
> > > "https://cdash.ourdomain.com/api/v1/?method=build&task=revisionstatus&project=ourproject&revision=923c1c8e19d27668ce22a8d84d9a9e8011df414a"
> > > []estan at edison:~$
> >
> > Forgot to mention: I get the same result if using GET method (leaving
> > out the -X POST).
> >
> > Elvis
> >
> > >
> > > Do we need to specify the Git revision manually somehow when
> > > submitting our CTest builds to CDash, for them to be associated with
> > > that Git revision? I was looking at
> > > https://cmake.org/cmake/help/latest/manual/ctest.1.html#ctest-submit-step
> > > for a Git revision parameter of some sorts, but couldn't find any, so
> > > I was assuming ctest_submit includes the Git revision information
> > > automatically.
> > >
> > > Thanks in advance,
> > > Elvis
More information about the CDash
mailing list