From 3a25c1e84c998a7966d478aa9ccd14de5367bc92 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 5 Apr 2016 13:08:59 -0400 Subject: [PATCH] Tests: use templates for stream intersection and packet_seq_num MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- tests/bin/Makefile.am | 2 +- tests/bin/{test_intersection => test_intersection.in} | 11 ++++++----- .../{test_packet_seq_num => test_packet_seq_num.in} | 11 ++++++----- tests/bin/test_trace_read.in | 0 4 files changed, 13 insertions(+), 11 deletions(-) rename tests/bin/{test_intersection => test_intersection.in} (80%) mode change 100755 => 100644 rename tests/bin/{test_packet_seq_num => test_packet_seq_num.in} (84%) mode change 100755 => 100644 mode change 100755 => 100644 tests/bin/test_trace_read.in diff --git a/tests/bin/Makefile.am b/tests/bin/Makefile.am index 46f8352a..2bf94246 100644 --- a/tests/bin/Makefile.am +++ b/tests/bin/Makefile.am @@ -1,6 +1,6 @@ noinst_SCRIPTS = test_trace_read test_intersection test_packet_seq_num CLEANFILES = $(noinst_SCRIPTS) -EXTRA_DIST = test_trace_read.in +EXTRA_DIST = test_trace_read.in test_intersection.in test_packet_seq_num.in $(noinst_SCRIPTS): %: %.in sed "s#@ABSTOPSRCDIR@#$(abs_top_srcdir)#g" < $< > $@ diff --git a/tests/bin/test_intersection b/tests/bin/test_intersection.in old mode 100755 new mode 100644 similarity index 80% rename from tests/bin/test_intersection rename to tests/bin/test_intersection.in index aec57dec..28cb58a4 --- a/tests/bin/test_intersection +++ b/tests/bin/test_intersection.in @@ -19,6 +19,7 @@ CURDIR=$(dirname $0) TESTDIR=$CURDIR/.. BABELTRACE_BIN=$CURDIR/../../converter/babeltrace +CTF_TRACES=@ABSTOPSRCDIR@/tests/ctf-traces source $TESTDIR/utils/tap/tap.sh @@ -40,16 +41,16 @@ test_intersect() { diag "Test the stream intersection feature" diag "2 streams offsetted with 3 packets intersecting" -test_intersect $TESTDIR/ctf-traces/intersection/3eventsintersect 8 3 +test_intersect ${CTF_TRACES}/intersection/3eventsintersect 8 3 diag "2 streams offsetted with 3 packets intersecting (exchanged file names)" -test_intersect $TESTDIR/ctf-traces/intersection/3eventsintersectreverse 8 3 +test_intersect ${CTF_TRACES}/intersection/3eventsintersectreverse 8 3 diag "No intersection between 2 streams" -test_intersect $TESTDIR/ctf-traces/intersection/nointersect 6 0 +test_intersect ${CTF_TRACES}/intersection/nointersect 6 0 diag "Only 1 stream" -test_intersect $TESTDIR/ctf-traces/intersection/onestream 3 3 +test_intersect ${CTF_TRACES}/intersection/onestream 3 3 diag "No stream at all" -test_intersect $TESTDIR/ctf-traces/intersection/nostream 0 0 +test_intersect ${CTF_TRACES}/intersection/nostream 0 0 diff --git a/tests/bin/test_packet_seq_num b/tests/bin/test_packet_seq_num.in old mode 100755 new mode 100644 similarity index 84% rename from tests/bin/test_packet_seq_num rename to tests/bin/test_packet_seq_num.in index 1b165ec2..3348a4c7 --- a/tests/bin/test_packet_seq_num +++ b/tests/bin/test_packet_seq_num.in @@ -19,6 +19,7 @@ CURDIR=$(dirname $0) TESTDIR=$CURDIR/.. BABELTRACE_BIN=$CURDIR/../../converter/babeltrace +CTF_TRACES=@ABSTOPSRCDIR@/tests/ctf-traces source $TESTDIR/utils/tap/tap.sh @@ -60,16 +61,16 @@ test_lost() { diag "Test the packet_seq_num validation" diag "No packet lost" -test_no_lost $TESTDIR/ctf-traces/packet_seq_num/no_lost +test_no_lost ${CTF_TRACES}/packet_seq_num/no_lost diag "No packet lost, packet_seq_num not starting at 0" -test_no_lost $TESTDIR/ctf-traces/packet_seq_num/no_lost_not_starting_at_0 +test_no_lost ${CTF_TRACES}/packet_seq_num/no_lost_not_starting_at_0 diag "1 stream, 2 packets lost before the last packet" -test_lost $TESTDIR/ctf-traces/packet_seq_num/2_lost_before_last "2" +test_lost ${CTF_TRACES}/packet_seq_num/2_lost_before_last "2" diag "2 streams, packets lost in one of them" -test_lost $TESTDIR/ctf-traces/packet_seq_num/2_streams_lost_in_1 "2" +test_lost ${CTF_TRACES}/packet_seq_num/2_streams_lost_in_1 "2" diag "2 streams, packets lost in both" -test_lost $TESTDIR/ctf-traces/packet_seq_num/2_streams_lost_in_2 "3,2,1" +test_lost ${CTF_TRACES}/packet_seq_num/2_streams_lost_in_2 "3,2,1" diff --git a/tests/bin/test_trace_read.in b/tests/bin/test_trace_read.in old mode 100755 new mode 100644 -- 2.34.1