From: David Goulet Date: Mon, 26 Aug 2013 20:21:18 +0000 (-0400) Subject: Fix: support VPATH build for tests X-Git-Tag: v2.3.0-rc3~19 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=c83e7ca00efd681ec2406d2a2b2622d373ae2647;p=lttng-tools.git Fix: support VPATH build for tests Fixes #613 Signed-off-by: David Goulet --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 6d5b00d9a..9d4e0dc0d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -13,3 +13,17 @@ endif dist_noinst_SCRIPTS = run.sh unit_tests fast_regression long_regression root_regression with_bindings_regression EXTRA_DIST = run.sh unit_tests fast_regression long_regression root_regression with_bindings_regression + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am index ddb737213..53e3e43c2 100644 --- a/tests/regression/Makefile.am +++ b/tests/regression/Makefile.am @@ -6,3 +6,16 @@ if HAVE_LIBLTTNG_UST_CTL SUBDIRS += ust endif # HAVE_LIBLTTNG_UST_CTL +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/kernel/Makefile.am b/tests/regression/kernel/Makefile.am index 6b2b89141..a3afbf8dd 100644 --- a/tests/regression/kernel/Makefile.am +++ b/tests/regression/kernel/Makefile.am @@ -1 +1,15 @@ EXTRA_DIST = test_event_basic test_all_events + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/tools/filtering/Makefile.am b/tests/regression/tools/filtering/Makefile.am index ca60dbf63..7889c8791 100644 --- a/tests/regression/tools/filtering/Makefile.am +++ b/tests/regression/tools/filtering/Makefile.am @@ -16,3 +16,17 @@ endif noinst_SCRIPTS = test_unsupported_op test_invalid_filter test_valid_filter EXTRA_DIST = test_unsupported_op test_invalid_filter test_valid_filter + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/tools/health/Makefile.am b/tests/regression/tools/health/Makefile.am index 098fbf421..c22d5ee39 100644 --- a/tests/regression/tools/health/Makefile.am +++ b/tests/regression/tools/health/Makefile.am @@ -39,3 +39,17 @@ endif dist_noinst_SCRIPTS = test_thread_exit test_thread_stall test_tp_fail EXTRA_DIST = test_thread_exit test_thread_stall test_tp_fail + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/tools/snapshots/Makefile.am b/tests/regression/tools/snapshots/Makefile.am index 40cb8e110..66e9ddd31 100644 --- a/tests/regression/tools/snapshots/Makefile.am +++ b/tests/regression/tools/snapshots/Makefile.am @@ -1,2 +1,16 @@ noinst_SCRIPTS = test_kernel test_kernel_streaming test_ust test_ust_streaming EXTRA_DIST = test_kernel test_kernel_streaming test_ust test_ust_streaming + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/tools/streaming/Makefile.am b/tests/regression/tools/streaming/Makefile.am index 050cdeacc..6519670de 100644 --- a/tests/regression/tools/streaming/Makefile.am +++ b/tests/regression/tools/streaming/Makefile.am @@ -1,2 +1,16 @@ noinst_SCRIPTS = test_ust test_kernel test_high_throughput_limits EXTRA_DIST = test_ust test_kernel test_high_throughput_limits + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/tools/tracefile-limits/Makefile.am b/tests/regression/tools/tracefile-limits/Makefile.am index f6ca23610..b9b45c5cb 100644 --- a/tests/regression/tools/tracefile-limits/Makefile.am +++ b/tests/regression/tools/tracefile-limits/Makefile.am @@ -1,2 +1,16 @@ noinst_SCRIPTS = test_tracefile_count test_tracefile_size EXTRA_DIST = test_tracefile_count test_tracefile_size + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/Makefile.am b/tests/regression/ust/Makefile.am index dbc9a17c1..b3620c008 100644 --- a/tests/regression/ust/Makefile.am +++ b/tests/regression/ust/Makefile.am @@ -5,4 +5,18 @@ SUBDIRS = nprocesses high-throughput low-throughput before-after multi-session \ EXTRA_DIST = test_event_basic test_event_wildcard +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi + endif diff --git a/tests/regression/ust/before-after/Makefile.am b/tests/regression/ust/before-after/Makefile.am index e37fe96d7..9ff98747a 100644 --- a/tests/regression/ust/before-after/Makefile.am +++ b/tests/regression/ust/before-after/Makefile.am @@ -1,2 +1,16 @@ noinst_SCRIPTS = test_before_after EXTRA_DIST = test_before_after + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/buffers-uid/Makefile.am b/tests/regression/ust/buffers-uid/Makefile.am index 4fefd8052..1925768ba 100644 --- a/tests/regression/ust/buffers-uid/Makefile.am +++ b/tests/regression/ust/buffers-uid/Makefile.am @@ -1,2 +1,16 @@ noinst_SCRIPTS = test_buffers_uid EXTRA_DIST = test_buffers_uid + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/daemon/Makefile.am b/tests/regression/ust/daemon/Makefile.am index d457c0643..76a34ef07 100644 --- a/tests/regression/ust/daemon/Makefile.am +++ b/tests/regression/ust/daemon/Makefile.am @@ -13,3 +13,17 @@ endif noinst_SCRIPTS = test_daemon test_daemon.py EXTRA_DIST = test_daemon test_daemon.py + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/exit-fast/Makefile.am b/tests/regression/ust/exit-fast/Makefile.am index ff47cd9de..539803d7b 100644 --- a/tests/regression/ust/exit-fast/Makefile.am +++ b/tests/regression/ust/exit-fast/Makefile.am @@ -13,3 +13,17 @@ endif noinst_SCRIPTS = test_exit-fast test_exit-fast.py EXTRA_DIST = test_exit-fast test_exit-fast.py + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/fork/Makefile.am b/tests/regression/ust/fork/Makefile.am index 97f134f79..89a2ec985 100644 --- a/tests/regression/ust/fork/Makefile.am +++ b/tests/regression/ust/fork/Makefile.am @@ -18,3 +18,17 @@ endif noinst_SCRIPTS = test_fork test_fork.py EXTRA_DIST = test_fork test_fork.py + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/high-throughput/Makefile.am b/tests/regression/ust/high-throughput/Makefile.am index 544640469..6e9c89e14 100644 --- a/tests/regression/ust/high-throughput/Makefile.am +++ b/tests/regression/ust/high-throughput/Makefile.am @@ -14,3 +14,17 @@ gen_events_LDADD = -llttng-ust noinst_SCRIPTS = test_high_throughput EXTRA_DIST = test_high_throughput + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/libc-wrapper/Makefile.am b/tests/regression/ust/libc-wrapper/Makefile.am index af12d31ed..d35ca8129 100644 --- a/tests/regression/ust/libc-wrapper/Makefile.am +++ b/tests/regression/ust/libc-wrapper/Makefile.am @@ -6,3 +6,17 @@ prog_LDADD = -llttng-ust -llttng-ust-libc-wrapper noinst_SCRIPTS = test_libc-wrapper test_libc-wrapper.py EXTRA_DIST = test_libc-wrapper test_libc-wrapper.py + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/linking/Makefile.am b/tests/regression/ust/linking/Makefile.am index d2c4ecabf..9f7ebecb9 100644 --- a/tests/regression/ust/linking/Makefile.am +++ b/tests/regression/ust/linking/Makefile.am @@ -83,3 +83,17 @@ endif noinst_SCRIPTS = test_linking test_linking.py demo_preload EXTRA_DIST = test_linking test_linking.py demo_preload + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/low-throughput/Makefile.am b/tests/regression/ust/low-throughput/Makefile.am index e62706007..3eef3ac5e 100644 --- a/tests/regression/ust/low-throughput/Makefile.am +++ b/tests/regression/ust/low-throughput/Makefile.am @@ -14,3 +14,17 @@ gen_events_LDADD = -llttng-ust -lurcu noinst_SCRIPTS = test_low_throughput EXTRA_DIST = test_low_throughput + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/multi-session/Makefile.am b/tests/regression/ust/multi-session/Makefile.am index 2d978e593..6ff204a66 100644 --- a/tests/regression/ust/multi-session/Makefile.am +++ b/tests/regression/ust/multi-session/Makefile.am @@ -14,3 +14,17 @@ gen_nevents_LDADD = -llttng-ust noinst_SCRIPTS = test_multi_session EXTRA_DIST = test_multi_session + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/nprocesses/Makefile.am b/tests/regression/ust/nprocesses/Makefile.am index 70a4eeabf..c8f505501 100644 --- a/tests/regression/ust/nprocesses/Makefile.am +++ b/tests/regression/ust/nprocesses/Makefile.am @@ -1,2 +1,16 @@ noinst_SCRIPTS = test_nprocesses EXTRA_DIST = test_nprocesses + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/overlap/Makefile.am b/tests/regression/ust/overlap/Makefile.am index 5e0a80467..1adddb542 100644 --- a/tests/regression/ust/overlap/Makefile.am +++ b/tests/regression/ust/overlap/Makefile.am @@ -2,3 +2,17 @@ SUBDIRS = demo noinst_SCRIPTS = test_overlap EXTRA_DIST = test_overlap + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/regression/ust/overlap/demo/Makefile.am b/tests/regression/ust/overlap/demo/Makefile.am index 68b6e087f..c5e9f92d5 100644 --- a/tests/regression/ust/overlap/demo/Makefile.am +++ b/tests/regression/ust/overlap/demo/Makefile.am @@ -35,4 +35,18 @@ endif noinst_SCRIPTS = demo-trace EXTRA_DIST = demo-trace + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi endif diff --git a/tests/regression/ust/periodical-metadata-flush/Makefile.am b/tests/regression/ust/periodical-metadata-flush/Makefile.am index c02092005..540cfb504 100644 --- a/tests/regression/ust/periodical-metadata-flush/Makefile.am +++ b/tests/regression/ust/periodical-metadata-flush/Makefile.am @@ -1,2 +1,16 @@ noinst_SCRIPTS = test_periodical_metadata_flush EXTRA_DIST = test_periodical_metadata_flush + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/stress/Makefile.am b/tests/stress/Makefile.am index 2f510f094..433d6ad83 100644 --- a/tests/stress/Makefile.am +++ b/tests/stress/Makefile.am @@ -2,3 +2,17 @@ noinst_SCRIPTS = README launch_ust_app test_multi_sessions_per_uid_10app \ test_multi_sessions_per_uid_5app_streaming EXTRA_DIST = README launch_ust_app test_multi_sessions_per_uid_10app \ test_multi_sessions_per_uid_5app_streaming + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/utils/Makefile.am b/tests/utils/Makefile.am index 931c865bc..b3d592973 100644 --- a/tests/utils/Makefile.am +++ b/tests/utils/Makefile.am @@ -2,3 +2,17 @@ SUBDIRS = tap testapp EXTRA_DIST = utils.sh test_utils.py babelstats.pl dist_noinst_SCRIPTS = utils.sh test_utils.py babelstats.pl + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi diff --git a/tests/utils/tap/Makefile.am b/tests/utils/tap/Makefile.am index d3b5b58f1..0e78398fe 100644 --- a/tests/utils/tap/Makefile.am +++ b/tests/utils/tap/Makefile.am @@ -2,3 +2,17 @@ noinst_LTLIBRARIES = libtap.la libtap_la_SOURCES = tap.c tap.h dist_noinst_SCRIPTS = tap.sh EXTRA_DIST = tap.sh + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi