Project

General

Profile

Bug #11638

dunetpc fails to compile due to test_LarsoftHuffmanCompressService.cxx

Added by Jonathan Insler almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
02/04/2016
Due date:
% Done:

100%

Estimated time:
Occurs In:
Experiment:
DUNE
Co-Assignees:
Duration:

Description

The latest version of develop in dunetpc failed to compile with error:

"CMake Error at dunetpc/dune/DetSim/Service/test/CMakeLists.txt:3 (cet_test): Unknown CMake command "cet_test".

Looking at the file, it appears related to the new test test_LarsoftHuffmanCompressService.cxx.

History

#1 Updated by Jonathan Insler almost 4 years ago

Jonathan Insler wrote:

The latest version of develop in dunetpc failed to compile with error:

"CMake Error at dunetpc/dune/DetSim/Service/test/CMakeLists.txt:3 (cet_test): Unknown CMake command "cet_test".

Looking at the file, it appears related to the new test test_LarsoftHuffmanCompressService.cxx.

Addendum: the problem was seen by Celio and myself, when attempting to build fresh versions of dunetpc's develop in new directories.

#2 Updated by Lynn Garren almost 4 years ago

I believe that all tests are meant to be in dunetpc/test. The cet_test macro will be found if the test is placed in dunetpc/test/DetSim/Service.

#3 Updated by David Adams almost 4 years ago

Sorry for the problems. I see someone has wiped out the all changes I put in yesterday. I will try to recover these and then fix the issue with the test. It would have been easy to comment out the use of the test directory in the cmake file.

da

#4 Updated by David Adams almost 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

I have reinstated my changes from yesterday (including the test) in develop.

Sorry again for the trouble.

da

#5 Updated by David Adams almost 4 years ago

  • Status changed from Resolved to Assigned

I am reopening this issue. Robert Sulej reports he has the new version of dunetpc but is still getting the error "Unknown CMake command "cet_test". Is anyone else able or not able to build dunetpc with my last mod? Look for the following in "git log":

commit 878e1f9b7ef0736f5e207af5f5252cedcc885137
Author: David Adams <>
Date: Fri Feb 5 08:15:44 2016 -0500

Reinstate last mods to LarsoftHuffmanCompressService.

Lynn, should everyone have the cet_test command in their cmake environment or am I somehow special?

Robert, please double check that you see the above in git log and that you see the following files in your checkout:

[dladams@atlassw9 dunetpc]$ l dune/DetSim/Service/test
total 8
4 rw-r--r- 1 dladams dladams 230 Feb 5 08:03 CMakeLists.txt
4 rw-r--r- 1 dladams dladams 2969 Feb 5 08:03 test_LarsoftHuffmanCompressService.cxx

#6 Updated by Lynn Garren almost 4 years ago

David, cet_test is ONLY available if the test is put under the dunetpc/test directory. Please move your code from dunetpc/dune/DetSim/Service/test to dunetpc/test/DetSim/Service.

#7 Updated by David Adams almost 4 years ago

I have updated the dunetpc develop branch so cmake does not process the files in dune/DetSim/Service/test. This should allow everyone to build while we figure out why some are having problems. Uncomment the line

#add_subdirectory(test)

at the end of dune/DetSim/Service/CMakeLists.txt to renable building of the tests.

I see Lynn earlier commented cet_test might not work at this directory location. Lynn, can you suggest how we can enable testing t this location. I would like to keep unit tests close to the units being tested. Thanks. --da

#8 Updated by David Adams almost 4 years ago

  • Assignee changed from David Adams to Lynn Garren
  • Priority changed from High to Normal

Lynn:

sorry for the cross posting. We were typing at the same time.

There must be a way to enable testing in other directories. If you can't help with this, can you tell me who can?

Thank you.

David

#9 Updated by Lynn Garren almost 4 years ago

  • Assignee changed from Lynn Garren to David Adams

#10 Updated by Erica Snider almost 4 years ago

Hi Dave,
Our guidelines for unit and integration tests have been to put them all under the top-level test sub-directory. This is the policy for things in LArSoft. A quick perusal of the repositories confirms that everyone has followed this so far.

Having said that, the policy to consolidate these particular tests into one place was designed to make the tests easy to identify and manage separately from the balance of the source. DUNE can of course choose to do otherwise, at least with the unit tests run by 'make test', so can spread them about if needed. I don't know of any adverse consequences respect to our CI system, although we've never checked. In particular, I don't know if the system will correctly collate all the test results. It just uses the results of 'make test', so presumably will do the right thing if 'make test' does. In any event, if you want to do this for dunetpc, then the magic incantation you need I believe is "include(CetTest)" to get cet_test to work, and "cet_enable_asserts()" to turn on any asserts that are needed for testing. Just put those in the appropriate CMakeLists.txt files.

Erica

#11 Updated by Gianluca Petrillo almost 4 years ago

I apologize for entering into this ticket as it were an e-mail...

Whatever the decision by DUNE is, I strongly suggest consistency within the DUNE repositories: move all tests either into or out of test/.

Back in my cave now.

#12 Updated by David Adams almost 4 years ago

  • Status changed from Assigned to Closed

I am closing this issue as we are now able build dunetpc by commenting out the test.

I open a new issue https://cdcvs.fnal.gov/redmine/issues/11664 for restoring the test.

#13 Updated by David Adams almost 4 years ago

Jonathon and Robert:

I have modified the develop branch of dunetpc to put back the test that was causing you build problems but have added the include line that Erica suggested would resolve your problems. Could you please check and see if you can build this branch of dunetpc and report your results in this ticket:

https://cdcvs.fnal.gov/redmine/issues/11664

Thank you.



Also available in: Atom PDF