Unverified Commit fe840def authored by acpaquette's avatar acpaquette Committed by GitHub
Browse files

Added check in cmake for invalid truth/unittest counts (#5471)

parent 668181ba
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -129,7 +129,12 @@ function(add_isis_obj folder reqLibs)
  # If there are multiple truth files, select based on the OS.
  list(LENGTH thisTestFiles numTest)
  list(LENGTH thisTruthFiles numTruth)
  if(NOT (${numTest} EQUAL ${numTruth}) )
  if(((${numTruth} EQUAL 0) OR (${numTest} EQUAL 0)) AND NOT (${numTruth} EQUAL ${numTest}))
    message( FATAL_ERROR "Error: Found different number of truth {${numTruth}} and test {${numTest}} files for ${folderName}!\n"
                         "There should be at least one object.truth file and one unittest.cpp file." )
  endif()

  if(${numTruth} GREATER ${numTest})

    # Look for a truth file that contains the OS string
    set(matchedTruth "NONE")
+0 −37
Original line number Diff line number Diff line
Unit Test for NEAR Shoemaker MsiCamera...
FileName: m0155881376f3_2p.cub
CK Frame: -93001

Kernel IDs: 
CK Frame ID = -93000
CK Reference ID = 1
SPK Target ID = -93
SPK Reference ID = 1

Spacecraft Name Long: Near Earth Asteroid Rendezvous
Spacecraft Name Short: NEAR
Instrument Name Long: Multi-Spectral Imager
Instrument Name Short: MSI

Shutter open = 33743204.872642480
Shutter close = 33743204.888642482

For upper left corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For upper right corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For lower left corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For lower right corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For center pixel position ...
Latitude OK
Longitude OK
+0 −84
Original line number Diff line number Diff line
Unit Test for OsirisRexTagcamsCamera...

Testing NAVCam (backwards compatibility)...
FileName: 20200303T213031S138_ncm_L0-reduced.cub
NAIF Frame ID: -64081

Kernel IDs: 
CK Frame ID = -64000
CK Reference ID = 1
SPK Target ID = -64
SPK Reference ID = 1

Spacecraft Name Long: OSIRIS-REx
Spacecraft Name Short: OSIRIS-REx
Instrument Name Long: Primary Optical Navigation (NCM) Camera
Instrument Name Short: NAVCam

Shutter open = 636543100.323429942
Shutter close = 636543100.323434234

For upper left corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For upper right corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For lower left corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For lower right corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For known pixel position (129.500000000, 97.000000000...
Latitude OK
Longitude OK
============================================================================

Testing NFTCam (backwards compatibility)...
FileName: 20201020T214241S004_nft_L0-reduced.cub
NAIF Frame ID: -64082

Kernel IDs: 
CK Frame ID = -64000
CK Reference ID = 1
SPK Target ID = -64
SPK Reference ID = 1

Spacecraft Name Long: OSIRIS-REx
Spacecraft Name Short: OSIRIS-REx
Instrument Name Long: Natural Feature Tracking (NFT) Camera
Instrument Name Short: NFTCam

Shutter open = 656502230.156404018
Shutter close = 656502230.156409860

For upper left corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For upper right corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For lower left corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For lower right corner ...
DeltaSample = 0.000000000
DeltaLine = 0.000000000

For known pixel position (129.500000000, 97.000000000...
Latitude OK
Longitude OK
============================================================================

Testing StowCam (backwards compatibility)...

TODO: COMPLETE IF/WHEN NAIF KERNELS AVAILABLE; CURRENT IK IS PLACEHOLDER.
============================================================================