3 # Copyright (C) - 2018 Anders Wallin <wallinux@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
="Auto load session(s)"
21 CONFIG_DIR
="${CURDIR}/configuration"
22 TESTDIR
=$CURDIR/..
/..
/..
/
23 SESSIOND_BIN
="lttng-sessiond"
24 RELAYD_BIN
="lttng-relayd"
26 export LTTNG_SESSION_CONFIG_XSD_PATH
=$
(readlink
-m ${TESTDIR}..
/src
/common
/config
/)
28 DIR
=$
(readlink
-f $TESTDIR)
32 source $TESTDIR/utils
/utils.sh
34 # MUST set TESTDIR before calling those functions
37 print_test_banner
"$TEST_DESC"
39 function test_auto_load_file
()
41 diag
"Test auto load file"
43 start_lttng_sessiond
$CURDIR/load-42.lttng
44 list_lttng_with_opts load-42
48 function test_auto_load_dir
()
50 diag
"Test auto load directory"
52 cp -f $CURDIR/load-42.lttng
$LTTNG_DIR/
54 start_lttng_sessiond
$LTTNG_DIR
55 list_lttng_with_opts load-42
59 function test_auto_load_lttng_home
()
61 diag
"Test auto load by setting LTTNG_HOME"
63 mkdir
-p $LTTNG_HOME/.lttng
/sessions
/auto
64 cp -f $CURDIR/load-42.lttng
$LTTNG_HOME/.lttng
/sessions
/auto
67 list_lttng_with_opts load-42
74 test_auto_load_lttng_home
77 for fct_test
in ${TESTS[@]};
79 export LTTNG_HOME
=$
(mktemp
-d)
80 export LTTNG_DIR
=$
(mktemp
-d)