Skip to contentSkip to conversation

Harmonize bootstrap script across projects

PATCH New Michael Jeanson 2 participants 5 messages May 12, 2016 3 messages 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]

#1 lore raw

PATCH 2/2 Harmonize bootstrap script across projects

---
 bootstrap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bootstrap +1 -1
index c71b862..6d140c1 100755
@@ -5,4 +5,4 @@ if [ ! -e config ]; then
 	mkdir config
 fi
 
-autoreconf -i
+autoreconf -vif
Signature · 6 lines
1.9.1

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
#2 lore raw

Re: [PATCH lttng-ust 1/2] Tests: Replace prove by autotools tap runner

In reply to a message not in the archive
Quoted 4 lines · ----- On May 12, 2016, at 11:01 AM, Michael Jeanson [email protected] wrote:

This patch removes the dependency on the prove perl script to run the TAP test suite. It replaces it with the autotools shell TAP driver that only requires a shell and awk.

Quoted 9 lines

Custom arguments can be passed to the test runner with env variables as follow:

env LOG_DRIVER_FLAGS='--comments --ignore-exit' \
TESTS='foo.test baz.test' make -e check

This tap driver also creates a log file for each test that can then be used by another system to build a test report.

This changes the output of tests to the following:

[...]
PASS: ust-elf/test_ust_elf 44 - debug link filename - expected: main.elf.debug, got: main.elf.debug
PASS: ust-elf/test_ust_elf 45 - debug link crc - expected: 0x2b8cedce, got: 0x2b8cedce
PASS: ust-elf/test_ust_elf 46 - hello.exec is not PIC
PASS: ust-elf/test_ust_elf 47 - hello.pie is PIC
PASS: ust-elf/test_ust_elf 48 - hello.pic is PIC

Is it still TAP compliant ?

Thanks,

Mathieu

Quoted 177 lines

---

.gitignore        |  4 ++++
Makefile.am       |  4 ++++
configure.ac      |  2 ++
tests/Makefile.am | 29 ++++++++++++-----------------
tests/README      |  4 ++--
tests/run.sh      | 22 ----------------------
tests/test_loop   | 12 ------------
tests/unit_tests  |  2 --
8 files changed, 24 insertions(+), 55 deletions(-)

delete mode 100755 tests/run.sh
delete mode 100755 tests/test_loop
delete mode 100644 tests/unit_tests

.gitignore +2 -0
index 78cba0d..a5c33fb 100644
@@ -2,6 +2,8 @@
 *.swp
 *.o
 *.swo
+*.trs
+*.log

Makefile
.libs/
.deps/

.gitignore +0 -0
@@ -61,6 +63,8 @@ tests/ust-elf/prog

tests/ust-elf/test_ust_elf
tests/benchmark/bench1
tests/benchmark/bench2

.gitignore +2 -0
+tests/ctf-types/ctf-types
+tests/test-app-ctx/hello

# Java agent library
*.class

Makefile.am +0 -0
index 5bb5311..1db7480 100644
@@ -36,3 +36,7 @@ pkgconfig_DATA = lttng-ust.pc

dist_doc_DATA = README.md ChangeLog

dist_noinst_DATA = CodingStyle

Makefile.am +4 -0
+
+check-loop:
+	cd tests && $(MAKE) $(AM_MAKEFLAGS) check-loop
+.PHONY: check-loop
configure.ac +2 -0
index 7415373..26c3b1d 100644
@@ -33,6 +33,8 @@ AM_MAINTAINER_MODE([enable])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_SRCDIR([include/lttng/tracepoint.h])
 
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
+
 # Configuration options, which will be installed in the config.h
 AC_CONFIG_HEADERS([config.h include/lttng/ust-config.h])

AH_TEMPLATE([LTTNG_UST_HAVE_EFFICIENT_UNALIGNED_ACCESS], [Use efficient unaligned access.])

tests/Makefile.am +0 -0
index 377acd6..96a3faa 100644
@@ -5,23 +5,18 @@ if CXX_WORKS

SUBDIRS += hello.cxx
endif

tests/Makefile.am +12 -17
-SCRIPT_LIST = test_loop run.sh unit_tests
+LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+	$(top_srcdir)/config/tap-driver.sh
 
-dist_noinst_SCRIPTS = $(SCRIPT_LIST)
+TESTS = snprintf/test_snprintf \
+	ust-elf/test_ust_elf
 
-all-local:
-	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
-		for script in $(SCRIPT_LIST); do \
-			cp -f $(srcdir)/$$script $(builddir); \
-		done; \
-	fi
+check-loop:
+	while [ 0 ]; do \
+		$(MAKE) $(AM_MAKEFLAGS) check; \
+		if [ "$$?" != "0" ]; then \
+			break; \
+		fi \
+	done
 
-clean-local:
-	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
-		for script in $(SCRIPT_LIST); do \
-			rm -f $(builddir)/$$script; \
-		done; \
-	fi
-
-check-am:
-	./run.sh unit_tests
+.PHONY: check-loop
tests/README +0 -0
index 5f1da32..5f7bcc2 100644
@@ -1,10 +1,10 @@

Using the ust test suite.

Running

tests/README +1 -1
-	./run.sh unit_tests
+	make check

runs all the tests once.

Running

tests/README +1 -1
-	./test_loop
+	make check-loop

runs the test in a loop. This is useful to check for errors that would not always happen.

tests/run.sh deleted +0 -20
deleted file mode 100755
index c6c50fd..0000000
@@ -1,22 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2013 - Christian Babeux <[email protected]>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; only version 2
-# of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-
-[ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." &&

exit 1

tests/run.sh deleted +0 -2
-
-prove --merge --exec '' - < $1
tests/test_loop deleted +0 -12
deleted file mode 100755
index be3e16c..0000000
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-DIR=$(dirname $0)
-
-while [ 0 ]; do
-	$DIR/run.sh $DIR/unit_tests
-	if [ "$?" != "0" ]; then
-		break;
-	fi
-done
-
-echo "$0: ********* STOPPED BECAUSE OF ERROR *********"
tests/unit_tests deleted +0 -3
deleted file mode 100644
index 4d69789..0000000
@@ -1,2 +0,0 @@
-snprintf/test_snprintf
-ust-elf/test_ust_elf
--

1.9.1

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

#4 lore raw

Merged into master/stable-2.8.

Quoted 17 lines · ----- On May 12, 2016, at 11:01 AM, Michael Jeanson [email protected] wrote:

---
bootstrap | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
bootstrap +0 -0
index c71b862..6d140c1 100755
@@ -5,4 +5,4 @@ if [ ! -e config ]; then
 	mkdir config

fi

bootstrap +1 -2
-autoreconf -i
+autoreconf -vif
--

1.9.1

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

#6 lore raw

Re: [PATCH lttng-ust 1/2] Tests: Replace prove by autotools tap runner

Quoted 27 lines · ----- On May 12, 2016, at 11:30 AM, Mathieu Desnoyers…
Quoted 4 lines · ----- On May 12, 2016, at 11:01 AM, Michael Jeanson [email protected] wrote:

This patch removes the dependency on the prove perl script to run the TAP test suite. It replaces it with the autotools shell TAP driver that only requires a shell and awk.

Quoted 9 lines

Custom arguments can be passed to the test runner with env variables as follow:

env LOG_DRIVER_FLAGS='--comments --ignore-exit' \
TESTS='foo.test baz.test' make -e check

This tap driver also creates a log file for each test that can then be used by another system to build a test report.

This changes the output of tests to the following:

[...]
PASS: ust-elf/test_ust_elf 44 - debug link filename - expected: main.elf.debug,
got: main.elf.debug
PASS: ust-elf/test_ust_elf 45 - debug link crc - expected: 0x2b8cedce, got:
0x2b8cedce
PASS: ust-elf/test_ust_elf 46 - hello.exec is not PIC
PASS: ust-elf/test_ust_elf 47 - hello.pie is PIC
PASS: ust-elf/test_ust_elf 48 - hello.pic is PIC

Quoted 1 line

Is it still TAP compliant ?

The tests themselves still output TAP, it's the output of the autotools TAP driver that is different from "prove" that was previously used.

Michael
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

#7 lore raw

Re: [PATCH lttng-ust 1/2] Tests: Replace prove by autotools tap runner

In reply to a message not in the archive

merged into ust master and stable-2.8, thanks!

Mathieu

Quoted 190 lines · ----- On May 12, 2016, at 11:01 AM, Michael Jeanson [email protected] wrote:

This patch removes the dependency on the prove perl script to run the TAP test suite. It replaces it with the autotools shell TAP driver that only requires a shell and awk.

Custom arguments can be passed to the test runner with env variables as follow:

env LOG_DRIVER_FLAGS='--comments --ignore-exit' \
TESTS='foo.test baz.test' make -e check

This tap driver also creates a log file for each test that can then be used by another system to build a test report.

---

.gitignore        |  4 ++++
Makefile.am       |  4 ++++
configure.ac      |  2 ++
tests/Makefile.am | 29 ++++++++++++-----------------
tests/README      |  4 ++--
tests/run.sh      | 22 ----------------------
tests/test_loop   | 12 ------------
tests/unit_tests  |  2 --
8 files changed, 24 insertions(+), 55 deletions(-)

delete mode 100755 tests/run.sh
delete mode 100755 tests/test_loop
delete mode 100644 tests/unit_tests

.gitignore +2 -0
index 78cba0d..a5c33fb 100644
@@ -2,6 +2,8 @@
 *.swp
 *.o
 *.swo
+*.trs
+*.log

Makefile
.libs/
.deps/

.gitignore +0 -0
@@ -61,6 +63,8 @@ tests/ust-elf/prog

tests/ust-elf/test_ust_elf
tests/benchmark/bench1
tests/benchmark/bench2

.gitignore +2 -0
+tests/ctf-types/ctf-types
+tests/test-app-ctx/hello

# Java agent library
*.class

Makefile.am +0 -0
index 5bb5311..1db7480 100644
@@ -36,3 +36,7 @@ pkgconfig_DATA = lttng-ust.pc

dist_doc_DATA = README.md ChangeLog

dist_noinst_DATA = CodingStyle

Makefile.am +4 -0
+
+check-loop:
+	cd tests && $(MAKE) $(AM_MAKEFLAGS) check-loop
+.PHONY: check-loop
configure.ac +2 -0
index 7415373..26c3b1d 100644
@@ -33,6 +33,8 @@ AM_MAINTAINER_MODE([enable])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_SRCDIR([include/lttng/tracepoint.h])
 
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
+
 # Configuration options, which will be installed in the config.h
 AC_CONFIG_HEADERS([config.h include/lttng/ust-config.h])

AH_TEMPLATE([LTTNG_UST_HAVE_EFFICIENT_UNALIGNED_ACCESS], [Use efficient unaligned access.])

tests/Makefile.am +0 -0
index 377acd6..96a3faa 100644
@@ -5,23 +5,18 @@ if CXX_WORKS

SUBDIRS += hello.cxx
endif

tests/Makefile.am +12 -17
-SCRIPT_LIST = test_loop run.sh unit_tests
+LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+	$(top_srcdir)/config/tap-driver.sh
 
-dist_noinst_SCRIPTS = $(SCRIPT_LIST)
+TESTS = snprintf/test_snprintf \
+	ust-elf/test_ust_elf
 
-all-local:
-	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
-		for script in $(SCRIPT_LIST); do \
-			cp -f $(srcdir)/$$script $(builddir); \
-		done; \
-	fi
+check-loop:
+	while [ 0 ]; do \
+		$(MAKE) $(AM_MAKEFLAGS) check; \
+		if [ "$$?" != "0" ]; then \
+			break; \
+		fi \
+	done
 
-clean-local:
-	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
-		for script in $(SCRIPT_LIST); do \
-			rm -f $(builddir)/$$script; \
-		done; \
-	fi
-
-check-am:
-	./run.sh unit_tests
+.PHONY: check-loop
tests/README +0 -0
index 5f1da32..5f7bcc2 100644
@@ -1,10 +1,10 @@

Using the ust test suite.

Running

tests/README +1 -1
-	./run.sh unit_tests
+	make check

runs all the tests once.

Running

tests/README +1 -1
-	./test_loop
+	make check-loop

runs the test in a loop. This is useful to check for errors that would not always happen.

tests/run.sh deleted +0 -20
deleted file mode 100755
index c6c50fd..0000000
@@ -1,22 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2013 - Christian Babeux <[email protected]>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; only version 2
-# of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-
-[ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." &&

exit 1

tests/run.sh deleted +0 -2
-
-prove --merge --exec '' - < $1
tests/test_loop deleted +0 -12
deleted file mode 100755
index be3e16c..0000000
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-DIR=$(dirname $0)
-
-while [ 0 ]; do
-	$DIR/run.sh $DIR/unit_tests
-	if [ "$?" != "0" ]; then
-		break;
-	fi
-done
-
-echo "$0: ********* STOPPED BECAUSE OF ERROR *********"
tests/unit_tests deleted +0 -3
deleted file mode 100644
index 4d69789..0000000
@@ -1,2 +0,0 @@
-snprintf/test_snprintf
-ust-elf/test_ust_elf
--

1.9.1

Signature · 7 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev