source: trunk/test/Makefile.am @ 3317

Last change on this file since 3317 was 3317, checked in by Peter, 9 years ago

refs #806 add test for Pileup class

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 11.7 KB
Line 
1## $Id: Makefile.am 3317 2014-09-19 05:41:50Z 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 test/weighted_iterator_archetype.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/bam_pair_iterator.test \
49  test/cigar.test \
50  test/codon.test test/commandline.test \
51  test/concept.test \
52  test/consensus_inputranker.test test/data_lookup_1d.test  \
53  test/data_weight.test test/data_weight_proxy.test \
54  test/deleter.test \
55  test/distance.test \
56  test/dna.test test/ensemble.test test/feature_selection.test \
57  test/fileutil.test \
58  test/fisher.test test/genomic_position.test test/getline_iterator.test \
59  test/gff.test test/help.test test/histogram.test \
60  test/igp.test test/index.test test/inputranker.test test/interpolation.test \
61  test/iterator.test test/kendall.test test/kernel_lookup.test \
62  test/kernel_matrix.test \
63  test/kernel_pca.test test/kernel.test \
64  test/knn.test test/kolmogorov_smirnov.test test/large_file.test \
65  test/likelihood_ratio_test_binomial.test \
66  test/matrix_lookup.test \
67  test/matrix_lookup_weighted.test test/matrix.test \
68  test/matrix_weighted.test test/merge.test \
69  test/merge_iterator.test test/nbc.test \
70  test/ncc.test test/nni.test test/normalization.test \
71  test/ostream_iterator.test \
72  test/pca.test \
73  test/pileup.test \
74  test/queue.test test/queue2.test \
75  test/range.test test/regression.test test/rnd.test \
76  test/rng-mt.test \
77  test/roc.test \
78  test/score.test test/segment.test test/smart_ptr.test   \
79  test/smith_waterman.test \
80  test/smoother.test test/spearman.test \
81  test/split.test test/statistics.test test/stream_redirect.test \
82  test/subset_generator.test test/svd.test test/svm.test \
83  test/svm_multi_class.test test/target.test \
84  test/ttest.test test/tukey.test \
85  test/utility.test test/vector.test test/version.test \
86  test/weighted_iterator_archetype.test \
87  test/view.test
88
89TESTS = $(EXTRA_PROGRAMS)
90CLEANFILES += $(EXTRA_PROGRAMS)
91
92# tests not passing through yet
93XFAIL_TESTS =
94
95DISTRIBUTED_TESTS = \
96test/cmd_test.sh \
97test/doxygen_test.sh \
98test/help_test.sh \
99test/static_test.sh \
100test/yat_config_test.sh \
101test/yat_config_cblas_test.sh \
102test/yat_cpp_add_flag_test.sh \
103test/yat_cxx_add_flag_test.sh \
104test/yat_header_assert_test.sh \
105test/yat_ld_add_flag_test.sh \
106test/yat_have_svn_wc_test.sh \
107test/yat_lt_compile_ifelse_test.sh \
108test/yat_lt_link_ifelse_test.sh \
109test/yat_lt_link_la_ifelse_test.sh \
110test/yat_msg_error_test.sh \
111test/yat_msg_error_test2.sh \
112test/yat_m4_with_bam_test.sh \
113test/yat_m4_test.sh \
114test/yat_m4_test2.sh \
115test/yat_pc_test.sh \
116test/yat_prog_move_if_change_test.sh \
117test/yat_revision_header_test.sh \
118test/yat_svn_release_year_test.sh \
119test/yat_svn_revision_test.sh \
120test/yat_use_libtool_tag_test.sh
121
122TESTS += $(DISTRIBUTED_TESTS)
123EXTRA_DIST += $(DISTRIBUTED_TESTS)
124
125TEST_EXTENSIONS = .sh .test
126
127LDADD = yat/libyat.la test/libyattest.la $(YAT_LIBS)
128
129#test_large_file_test_LDADD = test/libyattest.la
130
131test_libyattest_la_LIBADD = yat/libyat.la
132test_libyattest_la_SOURCES = test/Suite.cc
133
134lazycheck:; $(MAKE) $(AM_MAKEFLAGS) check RECHECK_LOGS=
135
136shell_test_deps = $(srcdir)/test/init.sh test/defs.sh
137
138# dependencies for lazycheck
139test/bam.log: test/data/foo.sorted.bam
140test/bam_header.log: test/data/foo.sorted.bam
141test/bam_header2.log: test/data/foo.sorted.bam
142test/bam_iterator.log: test/data/foo.sorted.bam
143test/bam_pair_analyse.log: test/data/foo.sorted.bam
144test/bam_pair_iterator.log: test/data/foo.sorted.bam
145test/bam_read_filter.log: test/data/foo.sorted.bam
146test/bam_region_iterator.log: test/data/foo.sorted.bam
147test/cmd_test.log: test/help.test $(shell_test_deps)
148test/help_test.log: test/help.test $(shell_test_deps)
149test/pileup.log: test/data/foo.sorted.bam
150test/static_test.log: $(srcdir)/m4/yat.m4 $(shell_test_deps)
151test/yat_config_test.log: build_support/yat-config \
152  build_support/for_installation/yat-config $(shell_test_deps)
153test/yat_config_cblas_test.log: build_support/yat-config $(shell_test_deps)
154test/yat_cpp_add_flag_test.log: $(srcdir)/m4/yat_add_flag.m4 \
155  $(srcdir)/m4/ax_append_flag.m4 \
156  $(srcdir)/m4/ax_check_preproc_flag.m4 \
157  $(shell_test_deps)
158test/yat_cxx_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
159  $(top_srcdir)/m4/ax_append_compile_flags.m4 \
160  $(top_srcdir)/m4/ax_append_flag.m4 \
161  $(top_srcdir)/m4/ax_check_compile_flag.m4 \
162  $(top_srcdir)/m4/ax_require_defined.m4 \
163  $(shell_test_deps)
164test/yat_have_svn_wc_test.log: $(srcdir)/m4/yat_am_macros.m4 $(shell_test_deps)
165test/yat_ld_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
166  $(top_srcdir)/m4/ax_append_flag.m4 \
167  $(top_srcdir)/m4/ax_append_link_flags.m4 \
168  $(top_srcdir)/m4/ax_check_link_flag.m4 \
169  $(top_srcdir)/m4/ax_require_defined.m4 \
170  $(shell_test_deps)
171test/yat_lt_compile_ifelse_test.log: $(shell_test_deps) \
172  $(top_srcdir)/m4/yat_lt_link_ifelse.m4
173test/yat_lt_link_ifelse_test.log: $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
174  $(top_srcdir)/m4/yat.m4 $(shell_test_deps) \
175  $(top_builddir)/build_support/yat-config
176test/yat_lt_link_la_ifelse_test.log: $(shell_test_deps) \
177  test/lib/libmy-shared.la \
178  $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
179  $(top_srcdir)/m4/yat_common.m4
180test/yat_m4_test.log:$(top_srcdir)/m4/yat.m4 $(shell_test_deps) \
181  $(top_builddir)/build_support/yat-config
182test/yat_m4_test2.log:$(top_srcdir)/m4/yat.m4 $(shell_test_deps)
183test/yat_msg_error_test.log:$(srcdir)/m4/yat_msg_error.m4 $(shell_test_deps)
184test/yat_msg_error_test2.log:$(srcdir)/m4/yat_msg_error.m4 $(shell_test_deps)
185test/yat_pc_test.log: $(shell_test_deps) build_support/yat.pc
186test/yat_prog_move_if_change_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
187  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
188  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
189  $(top_srcdir)/m4/ax_file_escapes.m4 \
190  $(shell_test_deps)
191test/yat_revision_header_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
192  $(shell_test_deps) \
193  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
194  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
195  $(top_srcdir)/m4/ax_file_escapes.m4
196test/yat_svn_release_year_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
197  $(shell_test_deps) \
198  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
199  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
200  $(top_srcdir)/m4/ax_file_escapes.m4
201test/yat_svn_revision_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
202  $(shell_test_deps) \
203  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
204  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
205  $(top_srcdir)/m4/ax_file_escapes.m4
206test/yat_use_libtool_tag_test.log: $(shell_test_deps) \
207  $(top_srcdir)/m4/yat_lt_link_ifelse.m4
208
209if DX_ENABLE_HTML
210test/doxygen_test.log: doc/$(DX_HTML_OUTPUT)/index.html
211endif
212
213# yat-hello is an example of a tiny package that uses yat
214dist_noinst_DATA = $(srcdir)/test/yat-hello-1.0.tar.gz
215
216# Directory yat-hello contains what a developer would check out
217# from a VCS, i.e., no files generated by autotools.
218yat_hello_sources  =
219yat_hello_sources += $(srcdir)/test/yat-hello/configure.ac
220yat_hello_sources += $(srcdir)/test/yat-hello/Makefile.am
221yat_hello_sources += $(srcdir)/test/yat-hello/hello.cc
222
223EXTRA_DIST += $(yat_hello_sources)
224
225yat_hello_tmp_files =
226yat_hello_tmp_files += Makefile.in
227yat_hello_tmp_files += autom4te.cache
228yat_hello_tmp_files += aclocal.m4
229yat_hello_tmp_files += build-aux
230yat_hello_tmp_files += configure
231yat_hello_tmp_files += config.h.in
232yat_hello_tmp_files += m4
233
234
235yat_hello_deps = $(yat_hello_sources)
236yat_hello_deps += $(top_srcdir)/m4/yat.m4
237## We depend on version.m4 so tarball is updated at every release (at least)
238yat_hello_deps += $(top_srcdir)/m4/version.m4
239
240$(srcdir)/test/yat-hello-1.0.tar.gz: $(yat_hello_deps)
241  $(AM_V_GEN)$(MKDIR_P) $(srcdir)/test/yat-hello/m4 \
242  && cd $(srcdir)/test/yat-hello \
243  && cp $(abs_top_srcdir)/m4/yat.m4 m4/ \
244  && autoreconf -if $(yat_dev_null) \
245  && ./configure --without-yat $(yat_dev_null) \
246  && $(MAKE) $(AM_MAKEFLAGS) dist $(yat_dev_null) \
247  && $(MAKE) $(AM_MAKEFLAGS) distclean $(yat_dev_null) \
248  && mv yat-hello-1.0.tar.gz .. \
249  && rm -rf $(yat_hello_tmp_files)
250
251INSTALL_CHECK_TARGETS += yat-hello-check
252
253yat-hello-check: $(srcdir)/test/yat-hello-1.0.tar.gz
254  GZIP=$(GZIP_ENV) gzip -dc $(srcdir)/test/yat-hello-1.0.tar.gz | $(am__untar)\
255  && cd yat-hello-1.0 \
256  && ./configure --with-yat=$(bindir) \
257  && $(MAKE) $(AM_MAKEFLAGS) all \
258  && ./hello \
259  && test x"`./hello`" = x"$(VERSION)" \
260  && cd .. \
261  && rm -rf yat-hello-1.0
262
263
264## test data
265EXTRA_DIST += \
266test/data/foo.sam \
267test/data/isoform.peaks \
268test/data/knni_matrix.data \
269test/data/knni_result.data \
270test/data/knni_weight.data \
271test/data/nm_alpha_linear_matlab.txt \
272test/data/nm_data_centralized.txt \
273test/data/nm_kernel.txt \
274test/data/nm_kernel2.txt \
275test/data/nm_kernel_gaussian.txt \
276test/data/nm_target_bin.txt \
277test/data/normalization_test.data \
278test/data/rank_data.txt \
279test/data/rank_target.txt \
280test/data/regression_gauss.data \
281test/data/small.gff2 \
282test/data/small.gff3 \
283test/data/sorlie_centroid_classes.txt \
284test/data/sorlie_centroid_data.txt  \
285test/data/sorlie_centroid_predictions.txt \
286test/data/sorlie_centroids.txt \
287test/data/vector1.data  \
288test/data/vector2.data \
289test/data/vector3.data \
290test/data/vector4.data \
291test/data/vector5.data \
292test/data/vector6.data  \
293test/data/vector7.data \
294test/data/wenni_result.data \
295test/data/wenni_weight.data
296
297CLEANFILES += test/data/.dirstamp
298CLEANFILES += test/data/foo.bam
299CLEANFILES += test/data/foo.sorted.bam
300CLEANFILES += test/data/foo.sorted.bam.bai
301
302check_DATA  = test/data/foo.sorted.bam
303check_DATA += test/data/foo.sorted.bam.bai
304
305test/data/.dirstamp:
306  @$(MKDIR_P) test/data
307  @: > $@
308
309if HAVE_SAMTOOLS
310test/data/foo.bam: test/data/foo.sam test/data/.dirstamp Makefile
311  $(AM_V_GEN)
312  $(AM_V_at)$(SAMTOOLS) view -Sb $(srcdir)/test/data/foo.sam \
313  > $@-t && mv $@-t $@
314
315test/data/foo.sorted.bam: test/data/foo.bam
316  $(AM_V_GEN)
317  $(AM_V_at)$(SAMTOOLS) sort test/data/foo.bam test/data/foo.sorted
318
319test/data/foo.sorted.bam.bai: test/data/foo.sorted.bam
320  $(AM_V_GEN)
321  $(AM_V_at)$(SAMTOOLS) index test/data/foo.sorted.bam
322else
323test/data/foo.sorted.bam: test/data/.dirstamp
324  $(AM_V_at): > $@
325
326test/data/foo.sorted.bam.bai: test/data/.dirstamp
327  $(AM_V_at): > $@
328endif
329
330test/lib/.dirstamp:
331  @$(MKDIR_P) test/lib
332  @: > $@
333
334check_DATA += test/lib/libmy-static.a
335EXTRA_DIST += test/gen_libmy_static.sh
336
337test/lib/libmy-static.a: test/lib/.dirstamp test/gen_libmy_static.sh \
338test/defs.sh
339  $(AM_V_GEN)
340  $(AM_V_at)$(SHELL) $(srcdir)/test/gen_libmy_static.sh $(yat_dev_null)
341
342check_DATA += test/lib/libmy-shared.la
343EXTRA_DIST += test/gen_libmy_shared.sh
344
345test/lib/libmy-shared.la: test/lib/.dirstamp test/gen_libmy_shared.sh \
346test/defs.sh
347  $(AM_V_GEN)
348  $(AM_V_at)$(SHELL) $(srcdir)/test/gen_libmy_shared.sh $(yat_dev_null)
Note: See TracBrowser for help on using the repository browser.