source: trunk/test/Makefile.am

Last change on this file was 4363, checked in by Peter, 3 weeks ago

skeleton to support case rows < columns and add more tests for PCA class. refs #216.

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