source: trunk/test/Makefile.am @ 4043

Last change on this file since 4043 was 4043, checked in by Peter, 9 months ago

Add capacity to Queue and PriorityQueue?, which is a feature to limit
the size of the queue, i.e., a push is waiting until size < capacity
before completing the push.

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