@@ -1,9 +1,4 @@
*~
-/tests/bin/test_trace_read
-/tests/bin/intersection/test_intersection
-/tests/bin/intersection/bt_python_helper.py
-/tests/bin/test_packet_seq_num
-/tests/bin/test_formats
/tests/lib/test_bitfield
/tests/lib/test_seek
/tests/lib/test_ctf_writer
@@ -11,13 +6,8 @@
/tests/lib/test_bt_values
/tests/lib/test_ctf_ir_ref
/tests/lib/test_bt_ctf_field_type_validation
-/tests/lib/test_seek_big_trace
-/tests/lib/test_seek_empty_packet
/tests/lib/test_dwarf
/tests/lib/test_bin_info
-/tests/lib/test_bin_info_complete
-/tests/lib/test_ctf_writer_complete
-/tests/lib/test_dwarf_complete
*.o
*.a
*.la
@@ -370,18 +370,6 @@ AC_CONFIG_FILES([
babeltrace-ctf.pc
])
-AC_CONFIG_FILES([tests/lib/test_ctf_writer_complete], [chmod +x tests/lib/test_ctf_writer_complete])
-AC_CONFIG_FILES([tests/lib/test_seek_big_trace], [chmod +x tests/lib/test_seek_big_trace])
-AC_CONFIG_FILES([tests/lib/test_seek_empty_packet], [chmod +x tests/lib/test_seek_empty_packet])
-AC_CONFIG_FILES([tests/lib/test_dwarf_complete], [chmod +x tests/lib/test_dwarf_complete])
-AC_CONFIG_FILES([tests/lib/test_bin_info_complete], [chmod +x tests/lib/test_bin_info_complete])
-
-AC_CONFIG_FILES([tests/bin/test_trace_read], [chmod +x tests/bin/test_trace_read])
-AC_CONFIG_FILES([tests/bin/intersection/test_intersection], [chmod +x tests/bin/intersection/test_intersection])
-AC_CONFIG_FILES([tests/bin/intersection/bt_python_helper.py])
-AC_CONFIG_FILES([tests/bin/test_packet_seq_num], [chmod +x tests/bin/test_packet_seq_num])
-AC_CONFIG_FILES([tests/bin/test_formats], [chmod +x tests/bin/test_formats])
-
AC_OUTPUT
#
@@ -3,7 +3,7 @@ check_SCRIPTS = test_intersection \
test_multi_trace_intersection.py
dist_noinst_SCRIPTS = test_multi_trace_intersection.py
-EXTRA_DIST=test_multi_trace_intersection.py
+EXTRA_DIST=test_multi_trace_intersection.py bt_python_helper.py
all-local:
@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
similarity index 82%
rename from tests/bin/intersection/bt_python_helper.py.in
rename to tests/bin/intersection/bt_python_helper.py
@@ -23,13 +23,14 @@
# SOFTWARE.
import sys
+import os
# Point the Python interpreter to the builddir's library and Babeltrace
# bindings
-bt_module_path = '@abs_top_builddir@/bindings/python'
-bt_lib_py_path = '@abs_top_builddir@/bindings/python/babeltrace/.libs'
-bt_lib_bt_path = '@abs_top_builddir@/lib/.libs'
-bt_lib_ctf_path = '@abs_top_builddir@/format/ctf/.libs'
+bt_module_path = os.getenv('abs_top_builddir') + '/bindings/python'
+bt_lib_py_path = os.getenv('abs_top_builddir') + '/bindings/python/babeltrace/.libs'
+bt_lib_bt_path = os.getenv('abs_top_builddir') + '/lib/.libs'
+bt_lib_ctf_path = os.getenv('abs_top_builddir') + '/format/ctf/.libs'
sys.path.insert(0, bt_module_path)
sys.path.insert(1, bt_lib_py_path)
old mode 100644
new mode 100755
similarity index 90%
rename from tests/bin/intersection/test_intersection.in
rename to tests/bin/intersection/test_intersection
@@ -15,12 +15,7 @@
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-TESTDIR=@abs_top_srcdir@/tests
-
-BABELTRACE_BIN=@abs_top_builddir@/converter/babeltrace
-CTF_TRACES=@abs_top_srcdir@/tests/ctf-traces
-
-source $TESTDIR/utils/tap/tap.sh
+. "$TAPLIB"
NUM_TESTS=10
old mode 100644
new mode 100755
similarity index 83%
rename from tests/bin/test_formats.in
rename to tests/bin/test_formats
@@ -15,18 +15,13 @@
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-CURDIR=$(dirname $0)
-TESTDIR=$CURDIR/..
-
-BABELTRACE_BIN=$CURDIR/../../converter/babeltrace
-
-source $TESTDIR/utils/tap/tap.sh
+. "$TAPLIB"
expected_formats=(text lttng-live dummy ctf-metadata ctf)
plan_tests ${#expected_formats[*]}
for format in "${expected_formats[@]}"; do
- "$BABELTRACE_BIN" --list | @GREP@ -qw "$format"
+ "$BABELTRACE_BIN" --list | $GREP -qw "$format"
ok $? "Detect support for format \"$format\""
done
old mode 100644
new mode 100755
similarity index 82%
rename from tests/bin/test_packet_seq_num.in
rename to tests/bin/test_packet_seq_num
@@ -15,13 +15,7 @@
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-CURDIR=$(dirname $0)
-TESTDIR=$CURDIR/..
-
-BABELTRACE_BIN=$CURDIR/../../converter/babeltrace
-CTF_TRACES=@abs_top_srcdir@/tests/ctf-traces
-
-source $TESTDIR/utils/tap/tap.sh
+. "$TAPLIB"
NUM_TESTS=10
@@ -32,7 +26,7 @@ test_no_lost() {
$BABELTRACE_BIN $trace >/dev/null 2>&1
ok $? "Trace parses"
- $BABELTRACE_BIN $trace 2>&1 >/dev/null | @GREP@ "\[warning\] Tracer lost"
+ $BABELTRACE_BIN $trace 2>&1 >/dev/null | $GREP "\[warning\] Tracer lost"
if test $? = 0; then
fail 1 "Should not find any lost events"
else
@@ -51,9 +45,9 @@ test_lost() {
# [warning] Tracer lost 2 trace packets between ....
# [warning] Tracer lost 3 trace packets between ....
# into "2,3" and make sure it matches the expected result
- $BABELTRACE_BIN $trace 2>&1 >/dev/null | @GREP@ "\[warning\] Tracer lost" \
- | cut -d" " -f4 | tr "\n" "," | @SED@ "s/.$//" | \
- @GREP@ "$expectedcountstr" >/dev/null
+ $BABELTRACE_BIN $trace 2>&1 >/dev/null | $GREP "\[warning\] Tracer lost" \
+ | cut -d" " -f4 | tr "\n" "," | $SED "s/.$//" | \
+ $GREP "$expectedcountstr" >/dev/null
ok $? "Lost events string matches $expectedcountstr"
}
old mode 100644
new mode 100755
similarity index 88%
rename from tests/bin/test_trace_read.in
rename to tests/bin/test_trace_read
@@ -15,14 +15,7 @@
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-CURDIR=$(dirname $0)
-TESTDIR=$CURDIR/..
-
-BABELTRACE_BIN=$CURDIR/../../converter/babeltrace
-
-CTF_TRACES=@abs_top_srcdir@/tests/ctf-traces
-
-source $TESTDIR/utils/tap/tap.sh
+. "$TAPLIB"
SUCCESS_TRACES=(${CTF_TRACES}/succeed/*)
FAIL_TRACES=(${CTF_TRACES}/fail/*)
similarity index 86%
rename from tests/lib/test_dwarf_complete.in
rename to tests/lib/test_bin_info_complete
@@ -17,6 +17,4 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-DEBUG_INFO_DATA="@abs_top_srcdir@/tests/debug-info-data"
-
-"@abs_top_builddir@/tests/lib/test_dwarf" "$DEBUG_INFO_DATA"
+"$abs_top_builddir/tests/lib/test_bin_info" "$DEBUG_INFO_DATA"
similarity index 79%
rename from tests/lib/test_ctf_writer_complete.in
rename to tests/lib/test_ctf_writer_complete
@@ -17,7 +17,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-CTFPARSERTEST="@abs_top_builddir@/formats/ctf/metadata/ctf-parser-test"
-BTBIN="@abs_top_builddir@/converter/babeltrace"
+CTFPARSERTEST="$abs_top_builddir/formats/ctf/metadata/ctf-parser-test"
+BTBIN="$abs_top_builddir/converter/babeltrace"
-"@abs_top_builddir@/tests/lib/test_ctf_writer" "$CTFPARSERTEST" "$BTBIN"
+"$abs_top_builddir/tests/lib/test_ctf_writer" "$CTFPARSERTEST" "$BTBIN"
similarity index 85%
rename from tests/lib/test_bin_info_complete.in
rename to tests/lib/test_dwarf_complete
@@ -17,6 +17,4 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-DEBUG_INFO_DATA="@abs_top_srcdir@/tests/debug-info-data"
-
-"@abs_top_builddir@/tests/lib/test_bin_info" "$DEBUG_INFO_DATA"
+"$abs_top_builddir/tests/lib/test_dwarf" "$DEBUG_INFO_DATA"
similarity index 83%
rename from tests/lib/test_seek_big_trace.in
rename to tests/lib/test_seek_big_trace
@@ -18,6 +18,4 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-CTF_TRACES="@abs_top_srcdir@/tests/ctf-traces"
-
-"@abs_top_builddir@/tests/lib/test_seek" "$CTF_TRACES/succeed/lttng-modules-2.0-pre5/" 61334174524234 61336381998396
+"$abs_top_builddir/tests/lib/test_seek" "$CTF_TRACES/succeed/lttng-modules-2.0-pre5/" 61334174524234 61336381998396
similarity index 83%
rename from tests/lib/test_seek_empty_packet.in
rename to tests/lib/test_seek_empty_packet
@@ -18,6 +18,4 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-CTF_TRACES="@abs_top_srcdir@/tests/ctf-traces"
-
-"@abs_top_builddir@/tests/lib/test_seek" "$CTF_TRACES/succeed/wk-heartbeat-u/" 1351532897586558519 1351532897591331194
+"$abs_top_builddir/tests/lib/test_seek" "$CTF_TRACES/succeed/wk-heartbeat-u/" 1351532897586558519 1351532897591331194
Perform renames of the form test_foo.in => test_foo and rely on the environment as defined by the test harness. Adjust .gitignore accordingly and remove AC_CONFIG_FILES statements. Signed-off-by: Nathan Lynch <nathan_lynch at mentor.com> --- .gitignore | 10 ---------- configure.ac | 12 ------------ tests/bin/intersection/Makefile.am | 2 +- .../{bt_python_helper.py.in => bt_python_helper.py} | 9 +++++---- .../{test_intersection.in => test_intersection} | 7 +------ tests/bin/{test_formats.in => test_formats} | 9 ++------- .../bin/{test_packet_seq_num.in => test_packet_seq_num} | 16 +++++----------- tests/bin/{test_trace_read.in => test_trace_read} | 9 +-------- .../{test_dwarf_complete.in => test_bin_info_complete} | 4 +--- ...t_ctf_writer_complete.in => test_ctf_writer_complete} | 6 +++--- .../{test_bin_info_complete.in => test_dwarf_complete} | 4 +--- .../lib/{test_seek_big_trace.in => test_seek_big_trace} | 4 +--- ...{test_seek_empty_packet.in => test_seek_empty_packet} | 4 +--- 13 files changed, 22 insertions(+), 74 deletions(-) rename tests/bin/intersection/{bt_python_helper.py.in => bt_python_helper.py} (82%) rename tests/bin/intersection/{test_intersection.in => test_intersection} (90%) mode change 100644 => 100755 rename tests/bin/{test_formats.in => test_formats} (83%) mode change 100644 => 100755 rename tests/bin/{test_packet_seq_num.in => test_packet_seq_num} (82%) mode change 100644 => 100755 rename tests/bin/{test_trace_read.in => test_trace_read} (88%) mode change 100644 => 100755 rename tests/lib/{test_dwarf_complete.in => test_bin_info_complete} (86%) rename tests/lib/{test_ctf_writer_complete.in => test_ctf_writer_complete} (79%) rename tests/lib/{test_bin_info_complete.in => test_dwarf_complete} (85%) rename tests/lib/{test_seek_big_trace.in => test_seek_big_trace} (83%) rename tests/lib/{test_seek_empty_packet.in => test_seek_empty_packet} (83%)