Tests: trigger: mi: use utils.sh xsd versions for xml diff
[lttng-tools.git] / tests / utils / warn_processes.sh
CommitLineData
b67cd6f0 1#!/bin/bash
9d16b343
MJ
2#
3# Copyright (C) 2016 Michael Jeanson <mjeanson@efficios.com>
4#
5# SPDX-License-Identifier: GPL-2.0-only
6#
b67cd6f0 7
bce066c4
JR
8if [ -z $PGREP ]; then
9 PGREP=pgrep
10fi
4c2eee7f 11
b67cd6f0
PP
12if [ x$LTTNG_TOOLS_TESTS_DISABLE_WARN_LTTNG_PROCESSES == x1 ]; then
13 exit
14fi
15
fdd88fe2 16color_error='\E[1;91m'
b67cd6f0
PP
17color_reset='\E[0m'
18color_bold='\E[1m'
19
4c2eee7f 20lttng_processes="$("$PGREP" -l 'lttng|gen-ust-.+')"
b67cd6f0
PP
21
22if [ $? -eq 0 ]; then
23 pids="$(cut -d ' ' -f 1 <<< "$lttng_processes" | tr '\n' ' ')"
24
fdd88fe2 25 echo -e "${color_error}Error: the following LTTng processes were detected running on the system:$color_reset"
b67cd6f0
PP
26 echo
27 echo "$lttng_processes"
28 echo
29 echo -e "Here's how to kill them: ${color_bold}kill -9 $pids$color_reset"
b67cd6f0 30 echo
fdd88fe2
JG
31 echo "The test suite will not run in the presence of those processes since its result may not be reliable."
32 echo
33 exit 1
b67cd6f0 34fi
This page took 0.03484 seconds and 4 git commands to generate.