Add TAGS files to .gitignore
[lttng-tools.git] / tests / utils / warn_lttng_processes.sh
CommitLineData
b67cd6f0
PP
1#!/bin/bash
2
3if [ x$LTTNG_TOOLS_TESTS_DISABLE_WARN_LTTNG_PROCESSES == x1 ]; then
4 exit
5fi
6
7color_warn='\E[1;33m'
8color_reset='\E[0m'
9color_bold='\E[1m'
10
11lttng_processes="$("$1" 'lttng|gen-ust-.+' -a | grep -v "$(basename "$0")")"
12
13if [ $? -eq 0 ]; then
14 pids="$(cut -d ' ' -f 1 <<< "$lttng_processes" | tr '\n' ' ')"
15
16 echo -e "${color_warn}Warning: the following LTTng processes were detected running on the system:$color_reset"
17 echo
18 echo "$lttng_processes"
19 echo
20 echo -e "Here's how to kill them: ${color_bold}kill -9 $pids$color_reset"
21 echo -e "${color_warn}If you leave them alive, some tests could fail.$color_reset"
22 echo
23fi
This page took 0.025985 seconds and 5 git commands to generate.