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 export LTTNG_SESSION_CONFIG_XSD_PATH
=$
(readlink
-m ${TESTDIR}..
/src
/common
/config
/)
25 DIR
=$
(readlink
-f $TESTDIR)
29 source $TESTDIR/utils
/utils.sh
31 # MUST set TESTDIR before calling those functions
34 print_test_banner
"$TEST_DESC"
36 function test_auto_load_file
()
38 diag
"Test auto load file"
40 start_lttng_sessiond
$CURDIR/load-42.lttng
41 list_lttng_with_opts load-42
45 function test_auto_load_dir
()
47 diag
"Test auto load directory"
49 cp -f $CURDIR/load-42.lttng
$LTTNG_DIR/
51 start_lttng_sessiond
$LTTNG_DIR
52 list_lttng_with_opts load-42
56 function test_auto_load_lttng_home
()
58 diag
"Test auto load by setting LTTNG_HOME"
60 mkdir
-p $LTTNG_HOME/.lttng
/sessions
/auto
61 cp -f $CURDIR/load-42.lttng
$LTTNG_HOME/.lttng
/sessions
/auto
64 list_lttng_with_opts load-42
71 test_auto_load_lttng_home
74 for fct_test
in ${TESTS[@]};
76 export LTTNG_HOME
=$
(mktemp
-d)
77 export LTTNG_DIR
=$
(mktemp
-d)