Skip to content

Commit

Permalink
Moving some tests around so that 'make check' works properly, in supp…
Browse files Browse the repository at this point in the history
…ort of #339
  • Loading branch information
WardF committed May 24, 2017
1 parent f710b29 commit 59ded4a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
9 changes: 8 additions & 1 deletion ncdump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,14 @@ ENDIF()
add_sh_test(ncdump tst_netcdf4_4)
ENDIF()


###
# Some test reordering was required to ensure these tests
# only ran after ncdump was built.
###
add_sh_test(ncdump run_ncgen_tests)
IF(USE_NETCDF4)
add_sh_test(ncdump run_ncgen_nc4_tests)
ENDIF()

IF(NOT MSVC)
add_sh_test(ncdump tst_nccopy4)
Expand Down
7 changes: 4 additions & 3 deletions ncdump/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ check_PROGRAMS = rewrite-scalar ctest ctest64 ncdump tst_utf8 bom tst_dimsizes n
TESTS = tst_inttags.sh run_tests.sh tst_64bit.sh ctest ctest64 tst_output.sh \
tst_lengths.sh tst_calendars.sh tst_utf8 run_utf8_tests.sh \
tst_nccopy3.sh tst_charfill.sh tst_iter.sh tst_formatx3.sh tst_bom.sh \
tst_dimsizes.sh
tst_dimsizes.sh run_ncgen_tests.sh

if USE_NETCDF4
check_PROGRAMS += tst_fileinfo
TESTS += tst_fileinfo.sh
TESTS += tst_fileinfo.sh run_ncgen_nc4_tests.sh
endif

if LARGE_FILE_TESTS
Expand Down Expand Up @@ -163,7 +163,8 @@ run_utf8_nc4_tests.sh \
tst_formatx3.sh tst_formatx4.sh ref_tst_utf8_4.cdl \
tst_inttags.sh tst_inttags4.sh \
CMakeLists.txt XGetopt.c tst_bom.sh tst_inmemory_nc3.sh \
tst_dimsizes.sh tst_inmemory_nc4.sh tst_fileinfo.sh
tst_dimsizes.sh tst_inmemory_nc4.sh tst_fileinfo.sh run_ncgen_tests.sh \
run_ncgen_nc4_tests.sh

# CDL files and Expected results
SUBDIRS=cdl expected
Expand Down
13 changes: 9 additions & 4 deletions ncgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
IF(ENABLE_TESTS)
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
add_sh_test(ncgen run_tests)
IF(USE_NETCDF4)
add_sh_test(ncgen run_nc4_tests)
ENDIF()

##
# The following tests were moved to ncdump/, to ensure
# that they are run in the proper order.
##
#add_sh_test(ncgen run_tests)
#IF(USE_NETCDF4)
# add_sh_test(ncgen run_nc4_tests)
#ENDIF()
ENDIF()

SET(MAN_FILES ncgen.1)
Expand Down
2 changes: 1 addition & 1 deletion ncgen/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ man_MANS = ncgen.1

# These files all need to be distributed.
EXTRA_DIST = ncgen.y ncgen.l ncgenl.c $(man_MANS) internals.html \
run_tests.sh run_nc4_tests.sh c0.cdl c0_4.cdl ref_camrun.cdl \
c0.cdl c0_4.cdl ref_camrun.cdl \
ncf199.cdl CMakeLists.txt XGetopt.c c5.cdl \
compound_datasize_test.cdl compound_datasize_test2.cdl \
tst_gattenum.cdl tst_usuffix.cdl
Expand Down

0 comments on commit 59ded4a

Please sign in to comment.