Commit 55b9a13d90a6cc75cecc663a4bb2531903bf7ac7
1 parent
71d12a89
Build unit test executables for instrument modules in instrument directories
Showing
9 changed files
with
134 additions
and
31 deletions
inst/com/Makefile.am
| ... | ... | @@ -19,6 +19,9 @@ |
| 19 | 19 | # # |
| 20 | 20 | ############################################################################# |
| 21 | 21 | |
| 22 | +# Set sub directories | |
| 23 | +SUBDIRS = test | |
| 24 | + | |
| 22 | 25 | # Darwin support |
| 23 | 26 | MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ |
| 24 | 27 | @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET | ... | ... |
inst/com/test/Makefile.am
0 → 100644
| 1 | +############################################################################# | |
| 2 | +# Makefile.am for com/test module # | |
| 3 | +# ------------------------------------------------------------------------- # | |
| 4 | +# Copyright (C) 2016 Juergen Knoedlseder # | |
| 5 | +# ------------------------------------------------------------------------- # | |
| 6 | +# # | |
| 7 | +# This program is free software: you can redistribute it and/or modify # | |
| 8 | +# it under the terms of the GNU General Public License as published by # | |
| 9 | +# the Free Software Foundation, either version 3 of the License, or # | |
| 10 | +# (at your option) any later version. # | |
| 11 | +# # | |
| 12 | +# This program is distributed in the hope that it will be useful, # | |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
| 15 | +# GNU General Public License for more details. # | |
| 16 | +# # | |
| 17 | +# You should have received a copy of the GNU General Public License # | |
| 18 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
| 19 | +# # | |
| 20 | +############################################################################# | |
| 21 | + | |
| 22 | +# Test sources | |
| 23 | +test_COM_SOURCES = test_COM.cpp test_COM.hpp | |
| 24 | +test_COM_LDFLAGS = @LDFLAGS@ | |
| 25 | +test_COM_CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/../include -I$(top_srcdir)/include | |
| 26 | +test_COM_LDADD = $(top_builddir)/src/libgamma.la | |
| 27 | + | |
| 28 | +# Test programs (list of executables that will be compiled) | |
| 29 | +check_PROGRAMS = test_COM | ... | ... |
inst/cta/Makefile.am
| ... | ... | @@ -19,6 +19,9 @@ |
| 19 | 19 | # # |
| 20 | 20 | ############################################################################# |
| 21 | 21 | |
| 22 | +# Set sub directories | |
| 23 | +SUBDIRS = test | |
| 24 | + | |
| 22 | 25 | # Darwin support |
| 23 | 26 | MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ |
| 24 | 27 | @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET | ... | ... |
inst/cta/test/Makefile.am
0 → 100644
| 1 | +############################################################################# | |
| 2 | +# Makefile.am for cta/test module # | |
| 3 | +# ------------------------------------------------------------------------- # | |
| 4 | +# Copyright (C) 2016 Juergen Knoedlseder # | |
| 5 | +# ------------------------------------------------------------------------- # | |
| 6 | +# # | |
| 7 | +# This program is free software: you can redistribute it and/or modify # | |
| 8 | +# it under the terms of the GNU General Public License as published by # | |
| 9 | +# the Free Software Foundation, either version 3 of the License, or # | |
| 10 | +# (at your option) any later version. # | |
| 11 | +# # | |
| 12 | +# This program is distributed in the hope that it will be useful, # | |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
| 15 | +# GNU General Public License for more details. # | |
| 16 | +# # | |
| 17 | +# You should have received a copy of the GNU General Public License # | |
| 18 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
| 19 | +# # | |
| 20 | +############################################################################# | |
| 21 | + | |
| 22 | +# Test sources | |
| 23 | +test_CTA_SOURCES = test_CTA.cpp test_CTA.hpp | |
| 24 | +test_CTA_LDFLAGS = @LDFLAGS@ | |
| 25 | +test_CTA_CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/../include -I$(top_srcdir)/include | |
| 26 | +test_CTA_LDADD = $(top_builddir)/src/libgamma.la | |
| 27 | + | |
| 28 | +# Test programs (list of executables that will be compiled) | |
| 29 | +check_PROGRAMS = test_CTA | ... | ... |
inst/lat/Makefile.am
| ... | ... | @@ -19,6 +19,9 @@ |
| 19 | 19 | # # |
| 20 | 20 | ############################################################################# |
| 21 | 21 | |
| 22 | +# Set sub directories | |
| 23 | +SUBDIRS = test | |
| 24 | + | |
| 22 | 25 | # Darwin support |
| 23 | 26 | MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ |
| 24 | 27 | @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET | ... | ... |
inst/lat/test/Makefile.am
0 → 100644
| 1 | +############################################################################# | |
| 2 | +# Makefile.am for lat/test module # | |
| 3 | +# ------------------------------------------------------------------------- # | |
| 4 | +# Copyright (C) 2016 Juergen Knoedlseder # | |
| 5 | +# ------------------------------------------------------------------------- # | |
| 6 | +# # | |
| 7 | +# This program is free software: you can redistribute it and/or modify # | |
| 8 | +# it under the terms of the GNU General Public License as published by # | |
| 9 | +# the Free Software Foundation, either version 3 of the License, or # | |
| 10 | +# (at your option) any later version. # | |
| 11 | +# # | |
| 12 | +# This program is distributed in the hope that it will be useful, # | |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
| 15 | +# GNU General Public License for more details. # | |
| 16 | +# # | |
| 17 | +# You should have received a copy of the GNU General Public License # | |
| 18 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
| 19 | +# # | |
| 20 | +############################################################################# | |
| 21 | + | |
| 22 | +# Test sources | |
| 23 | +test_LAT_SOURCES = test_LAT.cpp test_LAT.hpp | |
| 24 | +test_LAT_LDFLAGS = @LDFLAGS@ | |
| 25 | +test_LAT_CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/../include -I$(top_srcdir)/include | |
| 26 | +test_LAT_LDADD = $(top_builddir)/src/libgamma.la | |
| 27 | + | |
| 28 | +# Test programs (list of executables that will be compiled) | |
| 29 | +check_PROGRAMS = test_LAT | ... | ... |
inst/mwl/Makefile.am
| ... | ... | @@ -19,6 +19,9 @@ |
| 19 | 19 | # # |
| 20 | 20 | ############################################################################# |
| 21 | 21 | |
| 22 | +# Set sub directories | |
| 23 | +SUBDIRS = test | |
| 24 | + | |
| 22 | 25 | # Darwin support |
| 23 | 26 | MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ |
| 24 | 27 | @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET | ... | ... |
inst/mwl/test/Makefile.am
0 → 100644
| 1 | +############################################################################# | |
| 2 | +# Makefile.am for mwl/test module # | |
| 3 | +# ------------------------------------------------------------------------- # | |
| 4 | +# Copyright (C) 2016 Juergen Knoedlseder # | |
| 5 | +# ------------------------------------------------------------------------- # | |
| 6 | +# # | |
| 7 | +# This program is free software: you can redistribute it and/or modify # | |
| 8 | +# it under the terms of the GNU General Public License as published by # | |
| 9 | +# the Free Software Foundation, either version 3 of the License, or # | |
| 10 | +# (at your option) any later version. # | |
| 11 | +# # | |
| 12 | +# This program is distributed in the hope that it will be useful, # | |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
| 15 | +# GNU General Public License for more details. # | |
| 16 | +# # | |
| 17 | +# You should have received a copy of the GNU General Public License # | |
| 18 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
| 19 | +# # | |
| 20 | +############################################################################# | |
| 21 | + | |
| 22 | +# Test sources | |
| 23 | +test_MWL_SOURCES = test_MWL.cpp test_MWL.hpp | |
| 24 | +test_MWL_LDFLAGS = @LDFLAGS@ | |
| 25 | +test_MWL_CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/../include -I$(top_srcdir)/include | |
| 26 | +test_MWL_LDADD = $(top_builddir)/src/libgamma.la | |
| 27 | + | |
| 28 | +# Test programs (list of executables that will be compiled) | |
| 29 | +check_PROGRAMS = test_MWL | ... | ... |
test/Makefile.am
| ... | ... | @@ -21,40 +21,20 @@ |
| 21 | 21 | |
| 22 | 22 | # Optional instrument specific tests |
| 23 | 23 | if WITH_INST_MWL |
| 24 | - INST_MWL = test_MWL | |
| 25 | - INCL_MWL = -I$(top_srcdir)/inst/mwl/include | |
| 24 | + INST_MWL = $(top_builddir)/inst/mwl/test/test_MWL | |
| 26 | 25 | TEST_MWL = :$(top_srcdir)/inst/mwl/test |
| 27 | - test_MWL_SOURCES = $(top_srcdir)/inst/mwl/test/test_MWL.cpp | |
| 28 | - test_MWL_LDFLAGS = @LDFLAGS@ | |
| 29 | - test_MWL_CPPFLAGS = @CPPFLAGS@ | |
| 30 | - test_MWL_LDADD = $(top_builddir)/src/libgamma.la | |
| 31 | 26 | endif |
| 32 | 27 | if WITH_INST_CTA |
| 33 | - INST_CTA = test_CTA | |
| 34 | - INCL_CTA = -I$(top_srcdir)/inst/cta/include | |
| 28 | + INST_CTA = $(top_builddir)/inst/cta/test/test_CTA | |
| 35 | 29 | TEST_CTA = :$(top_srcdir)/inst/cta/test |
| 36 | - test_CTA_SOURCES = $(top_srcdir)/inst/cta/test/test_CTA.cpp | |
| 37 | - test_CTA_LDFLAGS = @LDFLAGS@ | |
| 38 | - test_CTA_CPPFLAGS = @CPPFLAGS@ | |
| 39 | - test_CTA_LDADD = $(top_builddir)/src/libgamma.la | |
| 40 | 30 | endif |
| 41 | 31 | if WITH_INST_LAT |
| 42 | - INST_LAT = test_LAT | |
| 43 | - INCL_LAT = -I$(top_srcdir)/inst/lat/include | |
| 32 | + INST_LAT = $(top_builddir)/inst/lat/test/test_LAT | |
| 44 | 33 | TEST_LAT = :$(top_srcdir)/inst/lat/test |
| 45 | - test_LAT_SOURCES = $(top_srcdir)/inst/lat/test/test_LAT.cpp | |
| 46 | - test_LAT_LDFLAGS = @LDFLAGS@ | |
| 47 | - test_LAT_CPPFLAGS = @CPPFLAGS@ | |
| 48 | - test_LAT_LDADD = $(top_builddir)/src/libgamma.la | |
| 49 | 34 | endif |
| 50 | 35 | if WITH_INST_COM |
| 51 | - INST_COM = test_COM | |
| 52 | - INCL_COM = -I$(top_srcdir)/inst/com/include | |
| 36 | + INST_COM = $(top_builddir)/inst/com/test/test_COM | |
| 53 | 37 | TEST_COM = :$(top_srcdir)/inst/com/test |
| 54 | - test_COM_SOURCES = $(top_srcdir)/inst/com/test/test_COM.cpp | |
| 55 | - test_COM_LDFLAGS = @LDFLAGS@ | |
| 56 | - test_COM_CPPFLAGS = @CPPFLAGS@ | |
| 57 | - test_COM_LDADD = $(top_builddir)/src/libgamma.la | |
| 58 | 38 | endif |
| 59 | 39 | |
| 60 | 40 | # Optional python bindings |
| ... | ... | @@ -70,11 +50,7 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ |
| 70 | 50 | # Include directories |
| 71 | 51 | INCLUDES = -I$(top_srcdir)/include \ |
| 72 | 52 | -I$(top_builddir)/src \ |
| 73 | - -I$(top_srcdir)/src/support \ | |
| 74 | - $(INCL_MWL) \ | |
| 75 | - $(INCL_CTA) \ | |
| 76 | - $(INCL_LAT) \ | |
| 77 | - $(INCL_COM) | |
| 53 | + -I$(top_srcdir)/src/support | |
| 78 | 54 | |
| 79 | 55 | # Test programs (those will be compiled) |
| 80 | 56 | check_PROGRAMS = test_GSupport \ |
| ... | ... | @@ -91,8 +67,7 @@ check_PROGRAMS = test_GSupport \ |
| 91 | 67 | test_GModel \ |
| 92 | 68 | test_GSky \ |
| 93 | 69 | test_GOptimizer \ |
| 94 | - test_GObservation \ | |
| 95 | - $(INST_MWL) $(INST_CTA) $(INST_LAT) $(INST_COM) | |
| 70 | + test_GObservation | |
| 96 | 71 | |
| 97 | 72 | # Set test environment (needed for linking with cfitsio and readline) |
| 98 | 73 | TESTS_ENVIRONMENT = @RUNSHARED@=$(top_builddir)/src/.libs$(TEST_ENV_DIR):$(@RUNSHARED@) \ | ... | ... |