X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fust-dl%2Ftest_ust-dl.py;h=96509c7cf798aeb15836d43ce9ce7b618a9f3aca;hb=9d16b343fb9e781fc8d8fa3c448a3f382306dd33;hp=81972a7db90e8ce57ffc6dd35e38a32188fd8e90;hpb=5e7baece55566e74965d2246b1220de261a764b8;p=lttng-tools.git diff --git a/tests/regression/ust/ust-dl/test_ust-dl.py b/tests/regression/ust/ust-dl/test_ust-dl.py index 81972a7db..96509c7cf 100644 --- a/tests/regression/ust/ust-dl/test_ust-dl.py +++ b/tests/regression/ust/ust-dl/test_ust-dl.py @@ -1,20 +1,9 @@ #!/usr/bin/env python3 # -# Copyright (C) - 2013 Jérémie Galarneau -# Copyright (C) - 2015 Antoine Busque +# Copyright (C) 2013 Jérémie Galarneau +# Copyright (C) 2015 Antoine Busque # -# 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 import os import subprocess @@ -31,6 +20,9 @@ sys.path.append(test_utils_path) from test_utils import * +have_dlmopen = (os.environ.get('LTTNG_TOOLS_HAVE_DLMOPEN') == '1') + + NR_TESTS = 14 current_test = 1 print("1..{0}".format(NR_TESTS)) @@ -113,7 +105,11 @@ current_test += 1 print_test_result(dlopen_event_found > 0, current_test, "lttng_ust_dl:dlopen event found in resulting trace") current_test += 1 -print_test_result(dlmopen_event_found > 0, current_test, "lttng_ust_dl:dlmopen event found in resulting trace") +if have_dlmopen: + print_test_result(dlmopen_event_found > 0, current_test, "lttng_ust_dl:dlmopen event found in resulting trace") +else: + skip_test(current_test, 'dlmopen() is not available') + current_test += 1 print_test_result(build_id_event_found > 0, current_test, "lttng_ust_dl:build_id event found in resulting trace")