3 # Copyright (C) - 2014 Jonathan Rajotte <jonathan.r.julien@gmail.com>
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation; version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this library; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 TEST_DESC
="Mi test command version"
21 TESTDIR
=$CURDIR/..
/..
/..
/
22 XSD_PATH
=$TESTDIR/..
/src
/common
/mi_lttng.xsd
23 SESSIOND_BIN
="lttng-sessiond"
24 RELAYD_BIN
="lttng-relayd"
25 LTTNG_BIN
="lttng --mi xml"
27 XML_VALIDATE
="$CURDIR/validate_xml $XSD_PATH"
29 LTTNG
=$TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN
32 DIR
=$
(readlink
-f $TESTDIR)
36 source $TESTDIR/utils
/utils.sh
38 # MUST set TESTDIR before calling those functions
41 print_test_banner
"$TEST_DESC"
43 function mi_print_version
()
48 $LTTNG version
$opt > $output_path
49 ok $?
"Machine Interface Lttng version"
53 function test_version_validation
()
55 mi_print_version version.xml
56 $XML_VALIDATE version.xml
57 ok $?
"Machine Interface Version xsd validation"
63 test_version_validation
66 for fct_test
in ${TESTS[@]};
68 TRACE_PATH
=$
(mktemp
-d)
74 # Only delete if successful