Skip to contentSkip to conversation

Cleanup: test Makefiles

PATCH Mathieu Desnoyers 1 participant 1 message Jan 14, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mathieu Desnoyers

author Applied
#1 lore raw

Merged into master branch, thanks!

Mathieu

Quoted 187 lines · ----- On Jan 14, 2019, at 4:29 PM, Michael Jeanson [email protected] wrote:

Remove unnessary complexity and use specific names for test programs.

---

.gitignore                                    |  5 ++--
configure.ac                                  |  2 ++
tests/gcc-weak-hidden/Makefile.am             | 14 +++--------
tests/gcc-weak-hidden/test_gcc_weak_hidden.in |  4 ----
tests/snprintf/Makefile.am                    | 24 +++----------------
tests/snprintf/{prog.c => snprintf.c}         |  0
tests/snprintf/test_snprintf                  |  4 ----
tests/ust-elf/Makefile.am                     | 14 ++++-------
tests/ust-elf/test_ust_elf.in                 |  4 ++--
tests/ust-elf/{prog.c => ust-elf.c}           |  0
10 files changed, 16 insertions(+), 55 deletions(-)

delete mode 100755 tests/gcc-weak-hidden/test_gcc_weak_hidden.in rename tests/snprintf/{prog.c => snprintf.c} (100%) delete mode 100755 tests/snprintf/test_snprintf
mode change 100755 => 100644 tests/ust-elf/test_ust_elf.in rename tests/ust-elf/{prog.c => ust-elf.c} (100%)

.gitignore +0 -0
index 482c6520..78646d74 100644
@@ -74,14 +74,13 @@ tests/ust-multi-test/ust-multi-test

tests/trace_event/trace_event_test
tests/tracepoint/benchmark/tracepoint_benchmark
tests/tracepoint/tracepoint_test

.gitignore +2 -2
-tests/snprintf/prog
-tests/ust-elf/prog
+tests/snprintf/test_snprintf
+tests/ust-elf/ust-elf

tests/ust-elf/test_ust_elf
tests/benchmark/bench1
tests/benchmark/bench2
tests/ctf-types/ctf-types
tests/test-app-ctx/hello
-tests/gcc-weak-hidden/test-gcc-wh
tests/gcc-weak-hidden/test_gcc_weak_hidden

# Java agent library

configure.ac +2 -0
index f9ee053f..9ab76501 100644
@@ -565,6 +565,8 @@ AC_CONFIG_LINKS([
 	python-lttngust/lttngust/loghandler.py:python-lttngust/lttngust/loghandler.py
 ])
 
+AC_CONFIG_FILES([tests/ust-elf/test_ust_elf],[chmod +x
 tests/ust-elf/test_ust_elf])
+

AC_OUTPUT

tests/gcc-weak-hidden/Makefile.am +0 -1
index eaeb2509..be9032a3 100644
@@ -3,15 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
-I$(top_srcdir)/tests/utils

noinst_LTLIBRARIES = libgcc-wh.la
libgcc_wh_la_SOURCES = c.c d.c

tests/gcc-weak-hidden/Makefile.am +3 -3
-noinst_PROGRAMS = test-gcc-wh
-test_gcc_wh_SOURCES = main.c b.c
-test_gcc_wh_LDADD = $(top_builddir)/tests/utils/libtap.a \
+noinst_PROGRAMS = test_gcc_weak_hidden
+test_gcc_weak_hidden_SOURCES = main.c b.c
+test_gcc_weak_hidden_LDADD = $(top_builddir)/tests/utils/libtap.a \
	$(builddir)/libgcc-wh.la
tests/gcc-weak-hidden/Makefile.am +0 -8
-
-noinst_SCRIPTS = test_gcc_weak_hidden
-CLEANFILES = $(noinst_SCRIPTS)
-EXTRA_DIST = test_gcc_weak_hidden.in
-
-$(noinst_SCRIPTS): %: %.in
-	$(SED) "s#@ABSTOPSRCDIR@#$(abs_top_srcdir)#g" < $< > $@
-	chmod +x $@
tests/gcc-weak-hidden/test_gcc_weak_hidden.in deleted +0 -4
deleted file mode 100755
index 7ad101f7..00000000
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-TEST_DIR=$(dirname $0)
-./${TEST_DIR}/test-gcc-wh
tests/snprintf/Makefile.am +0 -0
index 43021562..719e1cc8 100644
@@ -1,24 +1,6 @@

AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/tests/utils

tests/snprintf/Makefile.am +3 -3
-noinst_PROGRAMS = prog
-prog_SOURCES = prog.c
-prog_LDADD = $(top_builddir)/snprintf/libustsnprintf.la \
+noinst_PROGRAMS = test_snprintf
+test_snprintf_SOURCES = snprintf.c
+test_snprintf_LDADD = $(top_builddir)/snprintf/libustsnprintf.la \
	$(top_builddir)/tests/utils/libtap.a
tests/snprintf/Makefile.am +0 -18
-
-SCRIPT_LIST = test_snprintf
-
-dist_noinst_SCRIPTS = $(SCRIPT_LIST)
-
-all-local:
-	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
-		for script in $(SCRIPT_LIST); do \
-			cp -f $(srcdir)/$$script $(builddir); \
-		done; \
-	fi
-
-clean-local:
-	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
-		for script in $(SCRIPT_LIST); do \
-			rm -f $(builddir)/$$script; \
-		done; \
-	fi
tests/snprintf/snprintf.c renamed from tests/snprintf/prog.c +0 -0
similarity index 100%
rename from tests/snprintf/prog.c
rename to tests/snprintf/snprintf.c
tests/snprintf/test_snprintf deleted +0 -4
deleted file mode 100755
index cc77d408..00000000
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-TEST_DIR=$(dirname $0)
-./${TEST_DIR}/prog
tests/ust-elf/Makefile.am +0 -0
index 203272ed..f115eea4 100644
@@ -1,13 +1,11 @@

AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/tests/utils

tests/ust-elf/Makefile.am +3 -3
-noinst_PROGRAMS = prog
-prog_SOURCES = prog.c
-prog_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la \
+noinst_PROGRAMS = ust-elf
+ust_elf_SOURCES = ust-elf.c
+ust_elf_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la \
	$(top_builddir)/tests/utils/libtap.a
tests/ust-elf/Makefile.am +1 -3
-noinst_SCRIPTS = test_ust_elf
-CLEANFILES = $(noinst_SCRIPTS)
-EXTRA_DIST = test_ust_elf.in \
+EXTRA_DIST = \
	$(srcdir)/data/main.c \
	$(srcdir)/data/aarch64_be/main.elf \
	$(srcdir)/data/aarch64_be/main.elf.debug \
tests/ust-elf/Makefile.am +0 -4
@@ -22,7 +20,3 @@ EXTRA_DIST = test_ust_elf.in \
 	$(srcdir)/data/pic/hello.pic \
 	$(srcdir)/data/pic/hello.c \
 	$(srcdir)/data/pic/libhello.c
-
-$(noinst_SCRIPTS): %: %.in
-	$(SED) "s#@ABSTOPSRCDIR@#$(abs_top_srcdir)#g" < $< > $@
-	chmod +x $@
tests/ust-elf/test_ust_elf.in +2 -2
old mode 100755
new mode 100644
index 03a995fc..5aed2cba
@@ -1,4 +1,4 @@
 #!/bin/bash
 
-TEST_DIR=$(dirname $0)
-./${TEST_DIR}/prog @ABSTOPSRCDIR@/tests/ust-elf
+TEST_DIR=$(dirname "$0")
+"${TEST_DIR}/ust-elf" "@abs_top_srcdir@/tests/ust-elf"
tests/ust-elf/ust-elf.c renamed from tests/ust-elf/prog.c +0 -1
similarity index 100%
rename from tests/ust-elf/prog.c
rename to tests/ust-elf/ust-elf.c
--

2.17.1

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com