source: trunk/test/Makefile.am @ 3823

Last change on this file since 3823 was 3823, checked in by Peter, 3 years ago

Merge release 0.16 into trunk

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