source: trunk/test/Makefile.am @ 4252

Last change on this file since 4252 was 4252, checked in by Peter, 4 months ago

merge 0.20 release into trunk

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