From e1fec41ba85e9e9a04393ded656a30664728a60e Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Wed, 12 May 2021 21:21:28 -0400 Subject: [PATCH] Tests: Move python test app to `tests/utils/testapp` directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: I9bc55c0fc0b8de42157d64884c7e1ee08b800525 --- configure.ac | 2 +- tests/regression/ust/Makefile.am | 37 +++++++++++++++---- .../regression/ust/python-logging/Makefile.am | 7 ---- .../ust/python-logging/test_python_logging.in | 4 +- tests/utils/testapp/Makefile.am | 5 ++- tests/utils/testapp/gen-py-events/Makefile.am | 18 +++++++++ .../testapp/gen-py-events/gen-py-events.py} | 0 7 files changed, 54 insertions(+), 19 deletions(-) delete mode 100644 tests/regression/ust/python-logging/Makefile.am create mode 100644 tests/utils/testapp/gen-py-events/Makefile.am rename tests/{regression/ust/python-logging/test.py => utils/testapp/gen-py-events/gen-py-events.py} (100%) diff --git a/configure.ac b/configure.ac index 549b69962..0b4d893f7 100644 --- a/configure.ac +++ b/configure.ac @@ -1191,7 +1191,6 @@ AC_CONFIG_FILES([ tests/regression/ust/ust-dl/Makefile tests/regression/ust/java-jul/Makefile tests/regression/ust/java-log4j/Makefile - tests/regression/ust/python-logging/Makefile tests/regression/ust/getcpu-override/Makefile tests/regression/ust/clock-override/Makefile tests/regression/ust/type-declarations/Makefile @@ -1207,6 +1206,7 @@ AC_CONFIG_FILES([ tests/utils/testapp/Makefile tests/utils/testapp/gen-ns-events/Makefile tests/utils/testapp/gen-kernel-test-events/Makefile + tests/utils/testapp/gen-py-events/Makefile tests/utils/testapp/gen-ust-events/Makefile tests/utils/testapp/gen-ust-events-ns/Makefile tests/utils/testapp/gen-syscall-events-callstack/Makefile diff --git a/tests/regression/ust/Makefile.am b/tests/regression/ust/Makefile.am index 994fa6a68..49a1811ff 100644 --- a/tests/regression/ust/Makefile.am +++ b/tests/regression/ust/Makefile.am @@ -1,17 +1,40 @@ # SPDX-License-Identifier: GPL-2.0-only if HAVE_LIBLTTNG_UST_CTL -SUBDIRS = nprocesses high-throughput low-throughput before-after multi-session \ - overlap buffers-pid linking daemon exit-fast fork libc-wrapper \ - periodical-metadata-flush java-jul java-log4j python-logging \ - getcpu-override clock-override type-declarations \ - rotation-destroy-flush blocking multi-lib namespaces +SUBDIRS = \ + before-after \ + blocking \ + buffers-pid \ + clock-override \ + daemon \ + exit-fast \ + fork \ + getcpu-override \ + high-throughput \ + java-jul \ + java-log4j \ + libc-wrapper \ + linking \ + low-throughput \ + multi-lib \ + multi-session \ + namespaces \ + nprocesses \ + overlap \ + periodical-metadata-flush \ + rotation-destroy-flush \ + type-declarations if HAVE_OBJCOPY -SUBDIRS += baddr-statedump ust-dl +SUBDIRS += \ + baddr-statedump \ + ust-dl endif -EXTRA_DIST = test_event_basic test_event_tracef test_event_perf +EXTRA_DIST = \ + test_event_basic \ + test_event_perf \ + test_event_tracef all-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ diff --git a/tests/regression/ust/python-logging/Makefile.am b/tests/regression/ust/python-logging/Makefile.am deleted file mode 100644 index b0b28a00d..000000000 --- a/tests/regression/ust/python-logging/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -#if USE_PYTHON - -EXTRA_DIST = test.py - -#endif diff --git a/tests/regression/ust/python-logging/test_python_logging.in b/tests/regression/ust/python-logging/test_python_logging.in index bd370e721..342bac2f6 100755 --- a/tests/regression/ust/python-logging/test_python_logging.in +++ b/tests/regression/ust/python-logging/test_python_logging.in @@ -11,9 +11,9 @@ CURDIR=$(dirname $0)/ TESTDIR=$CURDIR/../../.. NR_ITER=5 NR_SEC_WAIT=0 -TESTAPP_NAME="test" +TESTAPP_NAME="gen-py-events" TESTAPP_BIN="$TESTAPP_NAME.py" -TESTAPP_PATH="@abs_top_srcdir@/tests/regression/ust/python-logging" +TESTAPP_PATH="$TESTDIR/utils/testapp/$TESTAPP_NAME/" SESSION_NAME="python-test" EVENT_NAME="python-ev-test1" EVENT_NAME2="python-ev-test2" diff --git a/tests/utils/testapp/Makefile.am b/tests/utils/testapp/Makefile.am index a8642e931..dcb83d2d9 100644 --- a/tests/utils/testapp/Makefile.am +++ b/tests/utils/testapp/Makefile.am @@ -1,11 +1,12 @@ # SPDX-License-Identifier: GPL-2.0-only SUBDIRS = \ + gen-kernel-test-events \ + gen-py-events \ + gen-syscall-events \ gen-ust-events \ gen-ust-nevents \ gen-ust-nevents-str \ gen-ust-tracef \ - gen-syscall-events \ - gen-kernel-test-events \ userspace-probe-elf-binary if CXX_WORKS diff --git a/tests/utils/testapp/gen-py-events/Makefile.am b/tests/utils/testapp/gen-py-events/Makefile.am new file mode 100644 index 000000000..e729b3c69 --- /dev/null +++ b/tests/utils/testapp/gen-py-events/Makefile.am @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-only + +noinst_SCRIPTS = gen-py-events.py +EXTRA_DIST = gen-py-events.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/python-logging/test.py b/tests/utils/testapp/gen-py-events/gen-py-events.py similarity index 100% rename from tests/regression/ust/python-logging/test.py rename to tests/utils/testapp/gen-py-events/gen-py-events.py -- 2.34.1