source: trunk/test/Makefile.am @ 3170

Last change on this file since 3170 was 3170, checked in by Peter, 8 years ago

in yat-hello-check test that versions agree. refs #771.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.0 KB
Line 
1## $Id: Makefile.am 3170 2014-01-31 12:01:48Z peter $
2
3# Copyright (C) 2003 Daniel Dalevi, Jari Häkkinen
4# Copyright (C) 2004 Jari Häkkinen, Peter Johansson, Cecilia Ritz
5# Copyright (C) 2005 Jari Häkkinen, Peter Johansson
6# Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
7# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Peter Johansson
8#
9# This file is part of the yat library, http://dev.thep.lu.se/yat
10#
11# The yat library is free software; you can redistribute it
12# and/or modify it under the terms of the GNU General Public License as
13# published by the Free Software Foundation; either version 3 of the
14# License, or (at your option) any later version.
15#
16# The yat library is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19# General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with yat. If not, see <http://www.gnu.org/licenses/>.
23
24## we use suffix .cc for all source
25AM_DEFAULT_SOURCE_EXT = .cc
26
27noinst_HEADERS = test/Suite.h
28
29check_LTLIBRARIES = test/libyattest.la
30
31check_SCRIPTS = test/defs.sh
32
33EXTRA_DIST += test/init.sh
34
35EXTRA_PROGRAMS = test/alignment.test \
36  test/alignment2.test \
37  test/averager.test \
38  test/averager1.test \
39  test/averager3.test \
40  test/averager4.test \
41  test/bam.test \
42  test/bam_pair_analyse.test \
43  test/bam_iterator.test \
44  test/bam_read_filter.test \
45  test/bam_region_iterator.test \
46  test/bam_header.test \
47  test/bam_header2.test \
48  test/codon.test test/commandline.test \
49  test/concept.test \
50  test/consensus_inputranker.test test/data_lookup_1d.test  \
51  test/data_weight.test test/data_weight_proxy.test \
52  test/deleter.test \
53  test/distance.test \
54  test/dna.test test/ensemble.test test/feature_selection.test \
55  test/fileutil.test \
56  test/fisher.test test/genomic_position.test test/getline_iterator.test \
57  test/gff.test test/help.test test/histogram.test \
58  test/igp.test test/index.test test/inputranker.test test/interpolation.test \
59  test/iterator.test test/kendall.test test/kernel_lookup.test \
60  test/kernel_pca.test test/kernel.test \
61  test/knn.test test/kolmogorov_smirnov.test test/large_file.test \
62  test/likelihood_ratio_test_binomial.test \
63  test/matrix_lookup.test \
64  test/matrix_lookup_weighted.test test/matrix.test \
65  test/matrix_weighted.test test/merge.test \
66  test/merge_iterator.test test/nbc.test \
67  test/ncc.test test/nni.test test/normalization.test \
68  test/ostream_iterator.test \
69  test/pca.test \
70  test/queue.test test/queue2.test \
71  test/range.test test/regression.test test/rnd.test \
72  test/rng-mt.test \
73  test/roc.test \
74  test/score.test test/segment.test test/smart_ptr.test   \
75  test/smoother.test test/spearman.test \
76  test/split.test test/statistics.test test/stream_redirect.test \
77  test/subset_generator.test test/svd.test test/svm.test \
78  test/svm_multi_class.test test/target.test \
79  test/ttest.test test/tukey.test \
80  test/utility.test test/vector.test test/version.test test/view.test
81
82TESTS = $(EXTRA_PROGRAMS)
83CLEANFILES += $(EXTRA_PROGRAMS)
84
85# tests not passing through yet
86XFAIL_TESTS =
87
88DISTRIBUTED_TESTS = \
89test/cmd_test.sh \
90test/doxygen_test.sh \
91test/help_test.sh \
92test/static_test.sh \
93test/yat_config_test.sh \
94test/yat_config_cblas_test.sh \
95test/yat_cpp_add_flag_test.sh \
96test/yat_cxx_add_flag_test.sh \
97test/yat_ld_add_flag_test.sh \
98test/yat_have_svn_wc_test.sh \
99test/yat_lt_compile_ifelse_test.sh \
100test/yat_lt_link_ifelse_test.sh \
101test/yat_lt_link_la_ifelse_test.sh \
102test/yat_msg_error_test.sh \
103test/yat_msg_error_test2.sh \
104test/yat_m4_with_bam_test.sh \
105test/yat_m4_test.sh \
106test/yat_m4_test2.sh \
107test/yat_pc_test.sh \
108test/yat_prog_move_if_change_test.sh \
109test/yat_revision_header_test.sh \
110test/yat_svn_release_year_test.sh \
111test/yat_svn_revision_test.sh \
112test/yat_use_libtool_tag_test.sh
113
114TESTS += $(DISTRIBUTED_TESTS)
115EXTRA_DIST += $(DISTRIBUTED_TESTS)
116
117TEST_EXTENSIONS = .sh .test
118
119LDADD = yat/libyat.la test/libyattest.la $(YAT_LIBS)
120
121#test_large_file_test_LDADD = test/libyattest.la
122
123test_libyattest_la_LIBADD = yat/libyat.la
124test_libyattest_la_SOURCES = test/Suite.cc
125
126lazycheck:; $(MAKE) $(AM_MAKEFLAGS) check RECHECK_LOGS=
127
128shell_test_deps = $(srcdir)/test/init.sh test/defs.sh
129
130# dependencies for lazycheck
131test/cmd_test.log: test/help.test $(shell_test_deps)
132test/help_test.log: test/help.test $(shell_test_deps)
133test/static_test.log: $(srcdir)/m4/yat.m4 $(shell_test_deps)
134test/yat_config_test.log: build_support/yat-config \
135  build_support/for_installation/yat-config $(shell_test_deps)
136test/yat_config_cblas_test.log: build_support/yat-config $(shell_test_deps)
137test/yat_cpp_add_flag_test.log: $(srcdir)/m4/yat_add_flag.m4 \
138  $(srcdir)/m4/ax_append_flag.m4 \
139  $(srcdir)/m4/ax_check_preproc_flag.m4 \
140  $(shell_test_deps)
141test/yat_cxx_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
142  $(top_srcdir)/m4/ax_append_compile_flags.m4 \
143  $(top_srcdir)/m4/ax_append_flag.m4 \
144  $(top_srcdir)/m4/ax_check_compile_flag.m4 \
145  $(shell_test_deps)
146test/yat_have_svn_wc_test.log: $(srcdir)/m4/yat_am_macros.m4 $(shell_test_deps)
147test/yat_ld_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
148  $(top_srcdir)/m4/ax_append_flag.m4 \
149  $(top_srcdir)/m4/ax_append_link_flags.m4 \
150  $(top_srcdir)/m4/ax_check_link_flag.m4 \
151  $(shell_test_deps)
152test/yat_lt_compile_ifelse_test.log: $(shell_test_deps) \
153  $(top_srcdir)/m4/yat_lt_link_ifelse.m4
154test/yat_lt_link_ifelse_test.log: $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
155  $(top_srcdir)/m4/yat.m4 $(shell_test_deps) \
156  $(top_builddir)/build_support/yat-config
157test/yat_lt_link_la_ifelse_test.log: $(shell_test_deps) \
158  test/lib/libmy-shared.la \
159  $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
160  $(top_srcdir)/m4/yat_common.m4
161test/yat_m4_test.log:$(top_srcdir)/m4/yat.m4 $(shell_test_deps) \
162  $(top_builddir)/build_support/yat-config
163test/yat_m4_test2.log:$(top_srcdir)/m4/yat.m4 $(shell_test_deps)
164test/yat_msg_error_test.log:$(srcdir)/m4/yat_msg_error.m4 $(shell_test_deps)
165test/yat_msg_error_test2.log:$(srcdir)/m4/yat_msg_error.m4 $(shell_test_deps)
166test/yat_pc_test.log: $(shell_test_deps) build_support/yat.pc
167test/yat_prog_move_if_change_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
168  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
169  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
170  $(top_srcdir)/m4/ax_file_escapes.m4 \
171  $(shell_test_deps)
172test/yat_revision_header_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
173  $(shell_test_deps) \
174  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
175  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
176  $(top_srcdir)/m4/ax_file_escapes.m4
177test/yat_svn_release_year_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
178  $(shell_test_deps) \
179  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
180  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
181  $(top_srcdir)/m4/ax_file_escapes.m4
182test/yat_svn_revision_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
183  $(shell_test_deps) \
184  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
185  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
186  $(top_srcdir)/m4/ax_file_escapes.m4
187test/yat_use_libtool_tag_test.log: $(shell_test_deps) \
188  $(top_srcdir)/m4/yat_lt_link_ifelse.m4
189
190if DX_ENABLE_HTML
191test/doxygen_test.log: doc/$(DX_HTML_OUTPUT)/index.html
192endif
193
194# yat-hello is an example of a tiny package that uses yat
195dist_noinst_DATA = $(srcdir)/test/yat-hello-1.0.tar.gz
196
197# Directory yat-hello contains what a developer would check out
198# from a VCS, i.e., no files generated by autotools.
199yat_hello_sources  =
200yat_hello_sources += $(srcdir)/test/yat-hello/configure.ac
201yat_hello_sources += $(srcdir)/test/yat-hello/Makefile.am
202yat_hello_sources += $(srcdir)/test/yat-hello/hello.cc
203
204EXTRA_DIST += $(yat_hello_sources)
205
206yat_hello_tmp_files =
207yat_hello_tmp_files += Makefile.in
208yat_hello_tmp_files += autom4te.cache
209yat_hello_tmp_files += aclocal.m4
210yat_hello_tmp_files += build-aux
211yat_hello_tmp_files += configure
212yat_hello_tmp_files += m4
213
214
215yat_hello_deps = $(yat_hello_sources)
216yat_hello_deps += $(top_srcdir)/m4/yat.m4
217## We depend on version.m4 so tarball is updated at every release (at least)
218yat_hello_deps += $(top_srcdir)/m4/version.m4
219
220$(srcdir)/test/yat-hello-1.0.tar.gz: $(yat_hello_deps)
221  $(AM_V_GEN)$(MKDIR_P) $(srcdir)/test/yat-hello/m4 \
222  && cd $(srcdir)/test/yat-hello \
223  && cp $(abs_top_srcdir)/m4/yat.m4 m4/ \
224  && autoreconf -if $(yat_dev_null) \
225  && ./configure --without-yat $(yat_dev_null) \
226  && $(MAKE) $(AM_MAKEFLAGS) dist $(yat_dev_null) \
227  && $(MAKE) $(AM_MAKEFLAGS) distclean $(yat_dev_null) \
228  && mv yat-hello-1.0.tar.gz .. \
229  && rm -rf $(yat_hello_tmp_files)
230
231INSTALL_CHECK_TARGETS += yat-hello-check
232
233yat-hello-check: $(srcdir)/test/yat-hello-1.0.tar.gz
234  GZIP=$(GZIP_ENV) gzip -dc $(srcdir)/test/yat-hello-1.0.tar.gz | $(am__untar)\
235  && cd yat-hello-1.0 \
236  && ./configure --with-yat=$(bindir) \
237  && $(MAKE) $(AM_MAKEFLAGS) all \
238  && ./hello \
239  && test x"`./hello`" = x"$(VERSION)" \
240  && cd .. \
241  && rm -rf yat-hello-1.0
242
243
244## test data
245EXTRA_DIST += \
246test/data/foo.sam \
247test/data/isoform.peaks \
248test/data/knni_matrix.data \
249test/data/knni_result.data \
250test/data/knni_weight.data \
251test/data/nm_alpha_linear_matlab.txt \
252test/data/nm_data_centralized.txt \
253test/data/nm_kernel.txt \
254test/data/nm_kernel2.txt \
255test/data/nm_kernel_gaussian.txt \
256test/data/nm_target_bin.txt \
257test/data/normalization_test.data \
258test/data/rank_data.txt \
259test/data/rank_target.txt \
260test/data/regression_gauss.data \
261test/data/small.gff2 \
262test/data/small.gff3 \
263test/data/sorlie_centroid_classes.txt \
264test/data/sorlie_centroid_data.txt  \
265test/data/sorlie_centroid_predictions.txt \
266test/data/sorlie_centroids.txt \
267test/data/vector1.data  \
268test/data/vector2.data \
269test/data/vector3.data \
270test/data/vector4.data \
271test/data/vector5.data \
272test/data/vector6.data  \
273test/data/vector7.data \
274test/data/wenni_result.data \
275test/data/wenni_weight.data
276
277CLEANFILES += test/data/.dirstamp
278CLEANFILES += test/data/foo.bam
279CLEANFILES += test/data/foo.sorted.bam
280CLEANFILES += test/data/foo.sorted.bam.bai
281
282check_DATA  = test/data/foo.sorted.bam
283check_DATA += test/data/foo.sorted.bam.bai
284
285test/data/.dirstamp:
286  @$(MKDIR_P) test/data
287  @: > $@
288
289if HAVE_SAMTOOLS
290test/data/foo.bam: test/data/foo.sam test/data/.dirstamp Makefile
291  $(AM_V_GEN)
292  $(AM_V_at)$(SAMTOOLS) view -Sb $(srcdir)/test/data/foo.sam \
293  > $@-t && mv $@-t $@
294
295test/data/foo.sorted.bam: test/data/foo.bam
296  $(AM_V_GEN)
297  $(AM_V_at)$(SAMTOOLS) sort test/data/foo.bam test/data/foo.sorted
298
299test/data/foo.sorted.bam.bai: test/data/foo.sorted.bam
300  $(AM_V_GEN)
301  $(AM_V_at)$(SAMTOOLS) index test/data/foo.sorted.bam
302else
303test/data/foo.sorted.bam: test/data/.dirstamp
304  $(AM_V_at): > $@
305
306test/data/foo.sorted.bam.bai: test/data/.dirstamp
307  $(AM_V_at): > $@
308endif
309
310test/lib/.dirstamp:
311  @$(MKDIR_P) test/lib
312  @: > $@
313
314check_DATA += test/lib/libmy-static.a
315EXTRA_DIST += test/gen_libmy_static.sh
316
317test/lib/libmy-static.a: test/lib/.dirstamp test/gen_libmy_static.sh \
318test/defs.sh
319  $(AM_V_GEN)
320  $(AM_V_at)$(SHELL) $(srcdir)/test/gen_libmy_static.sh $(yat_dev_null)
321
322check_DATA += test/lib/libmy-shared.la
323EXTRA_DIST += test/gen_libmy_shared.sh
324
325test/lib/libmy-shared.la: test/lib/.dirstamp test/gen_libmy_shared.sh \
326test/defs.sh
327  $(AM_V_GEN)
328  $(AM_V_at)$(SHELL) $(srcdir)/test/gen_libmy_shared.sh $(yat_dev_null)
Note: See TracBrowser for help on using the repository browser.