#!/bin/bash
#
-# Copyright (C) - 2014 David Goulet <dgoulet@efficios.com>
+# Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License, version 2 only, as published by
-# the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
TEST_DESC="Java LOG4J support"
function test_log4j_before_start ()
{
- local file_sync_after_first=$(mktemp -u)
- local file_sync_before_last=$(mktemp -u)
+ local file_sync_after_first=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX")
+ local file_sync_before_last=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX")
diag "Test LOG4J application BEFORE tracing starts"
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
print_test_banner "$TEST_DESC"
+bail_out_if_no_babeltrace
+
if [ ! -f "$TESTAPP_PATH.class" ]; then
withapp=0
else
for fct_test in ${tests[@]};
do
- TRACE_PATH=$(mktemp -d)
+ TRACE_PATH=$(mktemp --tmpdir -d tmp.test_java_log4j_trace_path.XXXXXX)
${fct_test}
if [ $? -ne 0 ]; then