NOAA-EMC / NCEPLIBS-bufr

The NCEPLIBS-bufr library contains routines and utilites for working with the WMO BUFR format.
Other
44 stars 19 forks source link

In test/CMakeLists.txt, the create_test function is intended to work for all new tests, not just the IN/OUT tests #386

Closed edwardhartnett closed 1 year ago

edwardhartnett commented 1 year ago

Recently the create_test() function in test/CMakeLists.txt was changed. It now works like this:

This function builds, links, and runs an intest or outtest program.

function(createtest name kind num) set(testID "${name}${num}${kind}") add_executable(${testID} ${name}${num}.F90) set_target_properties(${testID} PROPERTIES COMPILEFLAGS "${fortran${kind}_flags}") target_compiledefinitions(${testID} PUBLIC -DKIND${kind}) target_link_libraries(${testID} PRIVATE bufr_4) add_dependencies(${testID} bufr_4) if(${name} MATCHES "^intest") add_test(NAME ${testID} COMMAND ${testID}) else() add_test(NAME ${testID} COMMAND ${CMAKE_BINARY_DIR}/bin/test_outtest.sh ${testID} ${num}) endif() endfunction()

So it was changed to take the num argument.

But only the IN/OUT tests have a num argument. All other tests, including those that will be created in the next few weeks as part of the test campaign, do not have a num argument. So how to create those tests?

The original create_test() function was intended to work with any new test program, not just the IN/OUT ones.

jbathegit commented 1 year ago

That change happened during PR #331. I was trying to simplify the overall test/CMakeLists.txt, because at that time I didn't realize you were intending create_test() to eventually work for additional tests besides just the IN/OUT tests.

It's fine with me if you want to revert create_test() back to how it worked prior to PR #331. But at the same time, I also wish you'd have said something back then, before you even approved that PR in the first place ;-)

edwardhartnett commented 1 year ago

OK I was just being cranky because I was escorting a relative to doctors appointments all day. That would make anyone cranky! I will deal with this issue like a real adult today. ;-)