spack install : added --log-format option (incorporates test-install command)#2112
Conversation
|
@scheibelp I was wondering if you could review the changes here and see if anything looks wrong. @adamjstewart @tgamblin @davydden @citibeth Is there any other information that you would like to see in the JunitXML report and is not there yet ? |
davydden
left a comment
There was a problem hiding this comment.
looks good, maybe you could post here an example of test output to see how it all looks for a simple package with say 1-2 dependencies, with one of them already installed.
lib/spack/spack/cmd/install.py
Outdated
| test_case.set_result(TestResult.PASSED) | ||
| except InstallError: | ||
| # Check if the package relies on dependencies that | ||
| # did not install |
|
Ok, giving the command: with only the root that needs to be built produces the following report in <?xml version="1.0" ?>
<testsuite errors="0" failures="0" tests="11">
<testcase classname="zlib" name="[email protected]%[email protected] arch=linux-Ubuntu14-x86_64-asydrba" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="openssl" name="[email protected]%[email protected] arch=linux-Ubuntu14-x86_64-hibnfda" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="curl" name="[email protected]%[email protected] arch=linux-Ubuntu14-x86_64-2ffacqm" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="libsigsegv" name="[email protected]%[email protected] arch=linux-Ubuntu14-x86_64-g3qpmbi" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="m4" name="[email protected]%[email protected]+sigsegv arch=linux-Ubuntu14-x86_64-lhgqa6s" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="pkg-config" name="[email protected]%[email protected] arch=linux-Ubuntu14-x86_64-n6bkle3" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="libpciaccess" name="[email protected]%[email protected] arch=linux-Ubuntu14-x86_64-eo2siet" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="hwloc" name="[email protected]%[email protected] arch=linux-Ubuntu14-x86_64-3ostwel" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="openmpi" name="[email protected]%[email protected]~mxm~pmi~psm~psm2~slurm~sqlite3~thread_multiple~tm~verbs+vt arch=linux-Ubuntu14-x86_64-s3qbtby" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="hdf5" name="[email protected]%[email protected]+cxx~debug+fortran+mpi+shared~szip~threadsafe arch=linux-Ubuntu14-x86_64-3a22tnq" time="0.0">
<skipped message="Skipped [already installed]" type="already_installed"/>
</testcase>
<testcase classname="netcdf" name="[email protected]%[email protected]~hdf4 maxdims=1024 maxvars=8192+mpi arch=linux-Ubuntu14-x86_64-x7rkaqv" time="36.8761630058"/>
</testsuite> |
|
@alalazo thanks, looks good. I don't have in mind any further information we would need. Supposedly, there could be a script somewhere which can parse numerous XML (from different users who contribute test results) into a single output attached to a release? Maybe a document, html page or something that could be easy to navigate for a user to see which packages are tested on which architectures and which compilers for that particular release. |
|
p.s. I do not suggest to do this within the current PR, just throwing ideas on the table. |
|
@davydden To be fair @scheibelp implemented JUnitXML in the first place. I am just refactoring the stuff to reduce the number of similar commands in Spack without loosing the functionality. That said I think it will be an essential building block for a release installation test. What we are currently missing for that (and won't likely happen before SC) is imo:
I know there are some discussions that touched these topics in latest issues, but couldn't find them right now... |
I understand that, i was trying to see how would one later use this functionality for testing.
essentially i was speaking about this. Something like CDash would be good.
One of them is #2014 , i suppose... |
|
@alalazo : I think there is one more thing we have to log -- hash of the Spack and maybe the most recent tag. Maybe within |
|
So, I could set up a CDash instance in EC2 so we could at least start reporting test results. It apparently has some support NUnit format so we could start by adding a few fields to the current test format. What do people think of that? I am worried that the matrix display stuff is going to require more infrastructure than we have. I think Spack ultimately needs its own dashboard of some sort, where we could do |
|
What do I do with this xml file? It looks interesting but is not really
|
|
@citibeth: you submit it to Bamboo, Jenkins, or CDash. |
|
@citibeth All major CI framework supports that to display results in various way. |
|
@alalazo : you probably missed my comment above, but do we need to encode Spack's hash used to create tests? I would say yes. |
|
@davydden I didn't miss the message. I just need to have a look at the NUnit format to see how they support writing metadata (if they do at all). |
|
i see, no worries. |
|
This will be pretty awesome. On Tue, Oct 25, 2016 at 2:22 PM, Massimiliano Culpo <
|
|
@alalazo: do you want this merged now to update NUnit later, or do you want to keep it open? |
|
@tgamblin Fine with me to merge this and update later |
|
With #2433 the minimal requirements for uploading to CDash are now there. See https://cdash.cern.ch/index.php?project=Spack For now, that dashboard is free for submission via e.g. |
Modifications:
--log-formatand--log-filejoin_path(spack.var_path, 'junit-report')instead ofjoin_path(os.getcwd(), 'junit-report')