Skip to content

Commit

Permalink
Merge pull request ESMCI#1272 from NCAR/ejh_test_2
Browse files Browse the repository at this point in the history
Fixes to autotools build system
  • Loading branch information
edhartnett authored Jan 9, 2018
2 parents 856f951 + 01fa50a commit bb5f72a
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 25 deletions.
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This is part of PIO. It creates the main Makefile.

# Ed Hartnett

SUBDIRS = src tests
#Recommended by libtoolize

# Look in the m4 directory for autotools stuff.
ACLOCAL_AMFLAGS= -I m4
4 changes: 4 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# This is part of PIO. It creates the Makefile for the src directory.

# Ed Hartnett

SUBDIRS = clib
15 changes: 10 additions & 5 deletions src/clib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
# The library we are building.
lib_LTLIBRARIES = libpio.la

# These linker flags specify libtool version info.
# See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
# for information regarding incrementing `-version-info`.
libpio_la_LDFLAGS = -version-info 1:0:0

# The header file.
include_HEADERS = pio.h

# THe soure files.
libpio_la_SOURCES = bget.c pioc_sc.c pio_darray.c pio_file.c \
pio_getput_int.c pio_msg.c pio_nc.c pio_rearrange.c pio_varm.c \
pioc.c pioc_support.c pio_darray_int.c pio_get_nc.c pio_lists.c \
pio_nc4.c pio_put_nc.c pio_spmd.c pio_internal.h bget.h
# The library soure files.
libpio_la_SOURCES = bget.c pioc_sc.c pio_darray.c pio_file.c \
pio_getput_int.c pio_msg.c pio_nc.c pio_rearrange.c pio_varm.c pioc.c \
pioc_support.c pio_darray_int.c pio_get_nc.c pio_lists.c pio_nc4.c \
pio_put_nc.c pio_spmd.c pio_internal.h bget.h
5 changes: 5 additions & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# This file is part of PIO. It generates the Makefiles for the tests
# directory.

# Ed Hartnett

SUBDIRS = cunit
26 changes: 8 additions & 18 deletions tests/cunit/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
## This is the automake file for building the C tests for the PIO
## library.

# Ed Hartnett 8/17/17

# Link to our assembled library.
AM_LDFLAGS = ${top_builddir}/src/clib/libpio.la
AM_CPPFLAGS = -I$(top_srcdir)/src/clib

# The tests that will be run.
PIO_TESTS = test_async_mpi test_spmd test_intercomm2 \

# Build the tests for make check.
check_PROGRAMS = test_intercomm2 test_async_mpi test_spmd \
test_async_simple test_async_3proc test_async_4proc \
test_iosystem2_simple test_iosystem2_simple2 test_iosystem2 \
test_iosystem3_simple test_iosystem3_simple2 test_iosystem3 test_pioc \
Expand All @@ -18,11 +20,12 @@ test_decomp_uneven test_decomps test_rearr test_darray_async_simple \
test_darray_async test_darray_async_many test_darray_2sync \
test_async_multicomp test_async_multi2 test_async_manyproc

# Tests will run from a bash script.
TESTS = run_tests.sh

# Source code for each test.
test_async_mpi_SOURCES = test_async_mpi.c
test_intercomm2_SOURCES = test_intercomm2.c test_common.c pio_tests.h
test_async_simple_SOURCES = test_async_simple.c test_common.c pio_tests.h
test_async_3proc_SOURCES = test_async_3proc.c test_common.c pio_tests.h
test_async_4proc_SOURCES = test_async_4proc.c test_common.c pio_tests.h
test_iosystem2_simple_SOURCES = test_iosystem2_simple.c test_common.c pio_tests.h
test_iosystem2_simple2_SOURCES = test_iosystem2_simple2.c test_common.c pio_tests.h
Expand All @@ -49,26 +52,13 @@ test_darray_async_SOURCES = test_darray_async.c test_common.c pio_tests.h
test_darray_async_many_SOURCES = test_darray_async_many.c test_common.c pio_tests.h
test_darray_2sync_SOURCES = test_darray_2sync.c test_common.c pio_tests.h
test_spmd_SOURCES = test_spmd.c test_common.c pio_tests.h
test_intercomm2_SOURCES = test_async_simple.c test_common.c pio_tests.h
test_async_3proc_SOURCES = test_async_3proc.c test_common.c pio_tests.h
test_async_multicomp_SOURCES = test_async_multicomp.c test_common.c pio_tests.h
test_async_multi2_SOURCES = test_async_multi2.c test_common.c pio_tests.h
test_async_manyproc_SOURCES = test_async_manyproc.c test_common.c pio_tests.h

# Build the tests for the tests target.
tests: ${PIO_TESTS}

# Build the tests for make check.
check_PROGRAMS = $(PIO_TESTS)

# Tests will run from a bash script.
TESTS = run_tests.sh

# Bash script needs all tests built.
run_tests.sh : tests

# Distribute the test script.
EXTRA_DIST = run_tests.sh

# Clean up files produced during testing.
CLEANFILES = *.nc *.log
CLEANFILES = *.nc *.log decomp*.txt
2 changes: 1 addition & 1 deletion tests/cunit/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trap exit SIGINT SIGTERM

printf 'running PIO tests...\n'

PIO_TESTS='test_async_mpi test_spmd test_rearr test_intercomm2 test_async_simple '\
PIO_TESTS='test_intercomm2 test_async_mpi test_spmd test_rearr test_async_simple '\
'test_async_3proc test_async_4proc test_iosystem2_simple test_iosystem2_simple2 '\
'test_iosystem2 test_iosystem3_simple test_iosystem3_simple2 test_iosystem3 test_pioc '\
'test_pioc_unlim test_pioc_putget test_pioc_fill test_darray test_darray_multi '\
Expand Down
1 change: 1 addition & 0 deletions tests/cunit/test_intercomm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @author Ed Hartnett
*
*/
#include <config.h>
#include <pio.h>
#include <pio_tests.h>
#include <pio_internal.h>
Expand Down

0 comments on commit bb5f72a

Please sign in to comment.