source: trunk/test/Makefile.am @ 4332

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

don't depend on removed files

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