source: trunk/test/Makefile.am @ 4057

Last change on this file since 4057 was 4057, checked in by Peter, 7 months ago

closes #798; new classes BamPairBuffer? and a more general SortedBuffer?.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 13.7 KB
Line 
1## $Id: Makefile.am 4057 2021-03-31 05:46:00Z 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, 2015, 2016, 2017, 2018, 2019, 2020, 2021 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
35CXX_TESTS = 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.test \
43  test/bam_pair_analyse.test \
44  test/bam_pair_buffer.test \
45  test/bam_iterator.test \
46  test/bam_read_filter.test \
47  test/bam_region_iterator.test \
48  test/bam_header.test \
49  test/bam_header2.test \
50  test/bam_pair_iterator.test \
51  test/bam_pair_iterator2.test \
52  test/binary_read_write.test \
53  test/chi2.test \
54  test/cigar.test \
55  test/cigar2.test \
56  test/cigar_iterator.test \
57  test/codon.test test/commandline.test \
58  test/concept.test \
59  test/consensus_inputranker.test \
60  test/copy_k_of_n.test \
61  test/data_lookup_1d.test  \
62  test/data_weight.test test/data_weight_proxy.test \
63  test/deleter.test \
64  test/diagonal_matrix.test \
65  test/distance.test \
66  test/dna.test \
67  test/dna_reverse_complement.test \
68  test/ensemble.test \
69  test/fasta.test \
70  test/feature_selection.test \
71  test/fileutil.test \
72  test/fisher.test \
73  test/gaussian_mixture.test \
74  test/genomic_position.test test/getline_iterator.test \
75  test/getvector.test \
76  test/gff.test \
77  test/gsl_error_handler.test \
78  test/help.test test/histogram.test \
79  test/igp.test test/index.test test/inputranker.test test/interpolation.test \
80  test/iterator.test test/kendall.test test/kernel_lookup.test \
81  test/kernel_matrix.test \
82  test/kernel_pca.test test/kernel.test \
83  test/knn.test test/kolmogorov_smirnov.test \
84  test/large_file.test \
85  test/libbam.test \
86  test/likelihood_ratio_test_binomial.test \
87  test/matrix_lookup.test \
88  test/matrix_lookup_weighted.test test/matrix.test \
89  test/matrix_expression.test \
90  test/matrix_weighted.test test/merge.test \
91  test/merge_iterator.test \
92  test/multiprocess.test \
93  test/nbc.test \
94  test/ncc.test \
95  test/negative_binomial.test \
96  test/nni.test test/normalization.test \
97  test/ostream_iterator.test \
98  test/pca.test \
99  test/percentile_confidence_interval.test \
100  test/perceptron.test \
101  test/phred.test \
102  test/pileup.test \
103  test/print_what.test \
104  test/priority_queue.test \
105  test/poisson.test \
106  test/queue.test test/queue2.test \
107  test/queue3.test \
108  test/range.test test/regression.test test/rnd.test \
109  test/rng-mt.test \
110  test/roc.test \
111  test/score.test \
112  test/scheduler.test \
113  test/scheduler2.test \
114  test/scheduler3.test \
115  test/scheduler4.test \
116  test/scheduler5.test \
117  test/scheduler6.test \
118  test/scheduler7.test \
119  test/segment.test test/smart_ptr.test \
120  test/smith_waterman.test \
121  test/smoother.test test/spearman.test \
122  test/split.test test/statistics.test test/stream_redirect.test \
123  test/subset_generator.test test/svd.test test/svm.test \
124  test/svm_multi_class.test test/target.test \
125  test/ttest.test test/tukey.test \
126  test/utility.test test/vector.test test/version.test \
127  test/weighted_iterator_archetype.test \
128  test/vcf.test \
129  test/vcf_compare.test \
130  test/vcf_file.test \
131  test/vcf_file2.test \
132  test/vcf_file3.test \
133  test/vcf_header.test \
134  test/vector_expression.test \
135  test/view.test
136
137EXTRA_PROGRAMS = $(CXX_TESTS)
138
139CLEANFILES += $(EXTRA_PROGRAMS)
140
141# tests not passing through yet
142XFAIL_TESTS =
143
144DISTRIBUTED_TESTS = \
145test/cmd_test.sh \
146test/doxygen_test.sh \
147test/help_test.sh \
148test/yat_config_test.sh \
149test/yat_config_cblas_test.sh \
150test/yat_cpp_add_flag_test.sh \
151test/yat_cxx_add_flag_test.sh \
152test/yat_header_assert_test.sh \
153test/yat_ld_add_flag_test.sh \
154test/yat_have_svn_wc_test.sh \
155test/yat_lt_compile_ifelse_test.sh \
156test/yat_lt_link_ifelse_test.sh \
157test/yat_lt_link_la_ifelse_test.sh \
158test/yat_msg_error_test.sh \
159test/yat_msg_error_test2.sh \
160test/yat_m4_with_bam_test.sh \
161test/yat_m4_test.sh \
162test/yat_m4_test2.sh \
163test/yat_pc_test.sh \
164test/yat_prog_move_if_change_test.sh \
165test/yat_revision_header_test.sh \
166test/yat_svn_release_year_test.sh \
167test/yat_svn_revision_test.sh \
168test/yat_use_libtool_tag_test.sh
169
170TESTS = $(DISTRIBUTED_TESTS) $(CXX_TESTS)
171EXTRA_DIST += $(DISTRIBUTED_TESTS)
172
173TEST_EXTENSIONS = .sh .test
174
175LDADD = yat/libyat.la test/libyattest.la $(YAT_LIBS)
176
177#test_large_file_test_LDADD = test/libyattest.la
178
179test_libyattest_la_LIBADD = yat/libyat.la
180test_libyattest_la_SOURCES = test/Suite.cc
181
182lazycheck:; $(MAKE) $(AM_MAKEFLAGS) check RECHECK_LOGS=
183
184shell_test_deps = $(srcdir)/test/init.sh test/defs.sh
185
186# dependencies for lazycheck
187test/bam.log: test/data/foo.sorted.bam
188test/bam_header.log: test/data/foo.sorted.bam
189test/bam_header2.log: test/data/foo.sorted.bam
190test/bam_iterator.log: test/data/foo.sorted.bam
191test/bam_pair_analyse.log: test/data/foo.sorted.bam
192test/bam_pair_iterator.log: test/data/foo.sorted.bam
193test/bam_read_filter.log: test/data/foo.sorted.bam
194test/bam_region_iterator.log: test/data/foo.sorted.bam
195test/cmd_test.log: test/help.test $(shell_test_deps)
196test/help_test.log: test/help.test $(shell_test_deps)
197test/kendall.log: $(top_srcdir)/test/data/kendall.txt
198test/pileup.log: test/data/foo.sorted.bam
199test/static_test.log: $(srcdir)/m4/yat.m4 $(shell_test_deps)
200
201test/vcf_file.log: $(srcdir)/test/data/foo.vcf
202test/vcf_file2.log: test/data/foo.vcf.gz
203
204test/yat_config_test.log: build_support/yat-config \
205  build_support/for_installation/yat-config $(shell_test_deps)
206test/yat_config_cblas_test.log: build_support/yat-config $(shell_test_deps)
207test/yat_cpp_add_flag_test.log: $(srcdir)/m4/yat_add_flag.m4 \
208  $(srcdir)/m4/ax_append_flag.m4 \
209  $(srcdir)/m4/ax_check_preproc_flag.m4 \
210  $(shell_test_deps)
211test/yat_cxx_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
212  $(top_srcdir)/m4/ax_append_compile_flags.m4 \
213  $(top_srcdir)/m4/ax_append_flag.m4 \
214  $(top_srcdir)/m4/ax_check_compile_flag.m4 \
215  $(top_srcdir)/m4/ax_require_defined.m4 \
216  $(shell_test_deps)
217test/yat_have_svn_wc_test.log: $(srcdir)/m4/yat_am_macros.m4 $(shell_test_deps)
218test/yat_ld_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
219  $(top_srcdir)/m4/ax_append_flag.m4 \
220  $(top_srcdir)/m4/ax_append_link_flags.m4 \
221  $(top_srcdir)/m4/ax_check_link_flag.m4 \
222  $(top_srcdir)/m4/ax_require_defined.m4 \
223  $(shell_test_deps)
224test/yat_lt_compile_ifelse_test.log: $(shell_test_deps) \
225  $(top_srcdir)/m4/yat_lt_link_ifelse.m4
226test/yat_lt_link_ifelse_test.log: $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
227  $(top_srcdir)/m4/yat.m4 $(shell_test_deps) \
228  $(top_builddir)/build_support/yat-config
229test/yat_lt_link_la_ifelse_test.log: $(shell_test_deps) \
230  test/lib/libmy-shared.la \
231  $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
232  $(top_srcdir)/m4/yat_common.m4
233test/yat_m4_test.log:$(top_srcdir)/m4/yat.m4 $(shell_test_deps) \
234  $(top_builddir)/build_support/yat-config
235test/yat_m4_test2.log:$(top_srcdir)/m4/yat.m4 $(shell_test_deps)
236test/yat_msg_error_test.log:$(srcdir)/m4/yat_msg_error.m4 $(shell_test_deps)
237test/yat_msg_error_test2.log:$(srcdir)/m4/yat_msg_error.m4 $(shell_test_deps)
238test/yat_pc_test.log: $(shell_test_deps) build_support/yat.pc
239test/yat_prog_move_if_change_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
240  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
241  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
242  $(top_srcdir)/m4/ax_file_escapes.m4 \
243  $(shell_test_deps)
244test/yat_revision_header_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
245  $(shell_test_deps) \
246  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
247  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
248  $(top_srcdir)/m4/ax_file_escapes.m4
249test/yat_svn_release_year_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
250  $(shell_test_deps) \
251  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
252  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
253  $(top_srcdir)/m4/ax_file_escapes.m4
254test/yat_svn_revision_test.log: $(top_srcdir)/m4/yat_am_macros.m4 \
255  $(shell_test_deps) \
256  $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
257  $(top_srcdir)/m4/ax_ac_print_to_file.m4 \
258  $(top_srcdir)/m4/ax_file_escapes.m4
259test/yat_use_libtool_tag_test.log: $(shell_test_deps) \
260  $(top_srcdir)/m4/yat_lt_link_ifelse.m4
261
262if DX_ENABLE_HTML
263test/doxygen_test.log: doc/html/index.html
264endif
265
266# yat-hello is an example of a tiny package that uses yat
267dist_noinst_DATA = $(srcdir)/test/yat-hello-1.0.tar.gz
268
269# Directory yat-hello contains what a developer would check out
270# from a VCS, i.e., no files generated by autotools.
271yat_hello_sources  =
272yat_hello_sources += $(srcdir)/test/yat-hello/configure.ac
273yat_hello_sources += $(srcdir)/test/yat-hello/Makefile.am
274yat_hello_sources += $(srcdir)/test/yat-hello/hello.cc
275
276EXTRA_DIST += $(yat_hello_sources)
277
278yat_hello_tmp_files =
279yat_hello_tmp_files += Makefile.in
280yat_hello_tmp_files += autom4te.cache
281yat_hello_tmp_files += aclocal.m4
282yat_hello_tmp_files += build-aux
283yat_hello_tmp_files += configure
284yat_hello_tmp_files += config.h.in
285yat_hello_tmp_files += m4
286
287
288yat_hello_deps = $(yat_hello_sources)
289yat_hello_deps += $(top_srcdir)/m4/yat.m4
290## We depend on version.m4 so tarball is updated at every release (at least)
291yat_hello_deps += $(top_srcdir)/m4/version.m4
292
293$(srcdir)/test/yat-hello-1.0.tar.gz: $(yat_hello_deps)
294  $(AM_V_GEN)$(MKDIR_P) $(srcdir)/test/yat-hello/m4 \
295  && cd $(srcdir)/test/yat-hello \
296  && cp $(abs_top_srcdir)/m4/yat.m4 m4/ \
297  && autoreconf -if $(yat_dev_null) \
298  && ./configure --without-yat $(yat_dev_null) \
299  && $(MAKE) $(AM_MAKEFLAGS) dist $(yat_dev_null) \
300  && $(MAKE) $(AM_MAKEFLAGS) distclean $(yat_dev_null) \
301  && mv yat-hello-1.0.tar.gz .. \
302  && rm -rf $(yat_hello_tmp_files)
303
304INSTALL_CHECK_TARGETS += yat-hello-check
305
306yat-hello-check: $(srcdir)/test/yat-hello-1.0.tar.gz
307  GZIP=$(GZIP_ENV) gzip -dc $(srcdir)/test/yat-hello-1.0.tar.gz | $(am__untar)\
308  && cd yat-hello-1.0 \
309  && ./configure --with-yat=$(bindir) \
310  && $(MAKE) $(AM_MAKEFLAGS) all \
311  && ./hello \
312  && test x"`./hello`" = x"$(VERSION)" \
313  && cd .. \
314  && rm -rf yat-hello-1.0
315
316
317## test data
318EXTRA_DIST += \
319test/data/foo.sam \
320test/data/foo.vcf \
321test/data/isoform.peaks \
322test/data/kendall.txt \
323test/data/knni_matrix.data \
324test/data/knni_result.data \
325test/data/knni_weight.data \
326test/data/nm_alpha_linear_matlab.txt \
327test/data/nm_data_centralized.txt \
328test/data/nm_kernel.txt \
329test/data/nm_kernel2.txt \
330test/data/nm_kernel_gaussian.txt \
331test/data/nm_target_bin.txt \
332test/data/normalization_test.data \
333test/data/rank_data.txt \
334test/data/rank_target.txt \
335test/data/regression_gauss.data \
336test/data/small.gff2 \
337test/data/small.gff3 \
338test/data/sorlie_centroid_classes.txt \
339test/data/sorlie_centroid_data.txt  \
340test/data/sorlie_centroid_predictions.txt \
341test/data/sorlie_centroids.txt \
342test/data/vector1.data  \
343test/data/vector2.data \
344test/data/vector3.data \
345test/data/vector4.data \
346test/data/vector5.data \
347test/data/vector6.data  \
348test/data/vector7.data \
349test/data/wenni_result.data \
350test/data/wenni_weight.data
351
352CLEANFILES += test/data/.dirstamp
353CLEANFILES += test/data/foo.sorted.bam
354CLEANFILES += test/data/foo.sorted.bam.bai
355CLEANFILES += test/data/foo.fasta
356CLEANFILES += test/data/foo.fasta.fai
357CLEANFILES += test/data/foo.vcf.gz
358
359check_DATA  = test/data/foo.sorted.bam
360check_DATA += test/data/foo.sorted.bam.bai
361check_DATA += test/data/foo.fasta
362check_DATA += test/data/foo.fasta.fai
363check_DATA += test/data/foo.vcf.gz
364
365test/data/.dirstamp:
366  @$(MKDIR_P) test/data
367  @: > $@
368
369if HAVE_SAMTOOLS_EXECUTABLE
370# depend on config.h to ensure rule is triggered when
371# HAVE_SAMTOOLS_EXECUTABLE has changed and possible (empty) dummy bam
372# file is replaced with a proper one.
373test/data/foo.sorted.bam: test/data/.dirstamp test/data/foo.sam config.h
374  $(AM_V_GEN)
375  $(AM_V_at)$(SAMTOOLS) sort -T foo -o $@ $(srcdir)/test/data/foo.sam
376
377test/data/foo.sorted.bam.bai: test/data/foo.sorted.bam
378  $(AM_V_GEN)
379  $(AM_V_at)$(SAMTOOLS) index test/data/foo.sorted.bam
380
381else
382test/data/foo.sorted.bam: test/data/.dirstamp
383  $(AM_V_at): > $@
384
385test/data/foo.sorted.bam.bai: test/data/.dirstamp
386  $(AM_V_at): > $@
387endif
388
389if HAVE_SAMTOOLS_FASTA_EXECUTABLE
390test/data/foo.fasta: test/data/foo.sorted.bam
391  $(AM_V_GEN)
392  $(AM_V_at)$(SAMTOOLS) fasta test/data/foo.sorted.bam > $@
393
394test/data/foo.fasta.fai: test/data/foo.fasta
395  $(AM_V_GEN)
396  $(AM_V_at)$(SAMTOOLS) faidx test/data/foo.fasta
397
398else
399test/data/foo.fasta: test/data/.dirstamp
400  $(AM_V_at): > $@
401
402test/data/foo.fasta.fai: test/data/.dirstamp
403  $(AM_V_at): > $@
404endif
405
406if HAVE_BCFTOOLS_EXECUTABLE
407test/data/foo.vcf.gz: test/data/.dirstamp test/data/foo.vcf
408  $(AM_V_GEN)
409  $(AM_V_at)$(BCFTOOLS) view $(srcdir)/test/data/foo.vcf -O z > $@
410else
411test/data/foo.vcf.gz: test/data/.dirstamp
412  $(AM_V_at): > $@
413endif
414
415test/lib/.dirstamp:
416  @$(MKDIR_P) test/lib
417  @: > $@
418
419check_DATA += test/lib/libmy-static.a
420EXTRA_DIST += test/gen_libmy_static.sh
421
422test/lib/libmy-static.a: test/lib/.dirstamp test/gen_libmy_static.sh \
423test/defs.sh
424  $(AM_V_GEN)
425  $(AM_V_at)$(SHELL) $(srcdir)/test/gen_libmy_static.sh $(yat_dev_null)
426
427check_DATA += test/lib/libmy-shared.la
428EXTRA_DIST += test/gen_libmy_shared.sh
429
430test/lib/libmy-shared.la: test/lib/.dirstamp test/gen_libmy_shared.sh \
431test/defs.sh
432  $(AM_V_GEN)
433  $(AM_V_at)$(SHELL) $(srcdir)/test/gen_libmy_shared.sh $(yat_dev_null)
Note: See TracBrowser for help on using the repository browser.