projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
trackers: update list/track/untrack commands
[lttng-tools.git]
/
tests
/
utils
/
warn_processes.sh
diff --git
a/tests/utils/warn_processes.sh
b/tests/utils/warn_processes.sh
index fee1d0f58bfa24d0d716ab7a60e2bcd6d9c0c232..d84edb6f9c5686a2e421fef340af7f82f9b1154e 100755
(executable)
--- a/
tests/utils/warn_processes.sh
+++ b/
tests/utils/warn_processes.sh
@@
-1,12
+1,14
@@
#!/bin/bash
#!/bin/bash
-PGREP="$1"
+if [ -z $PGREP ]; then
+ PGREP=pgrep
+fi
if [ x$LTTNG_TOOLS_TESTS_DISABLE_WARN_LTTNG_PROCESSES == x1 ]; then
exit
fi
if [ x$LTTNG_TOOLS_TESTS_DISABLE_WARN_LTTNG_PROCESSES == x1 ]; then
exit
fi
-color_
warn='\E[1;33
m'
+color_
error='\E[1;91
m'
color_reset='\E[0m'
color_bold='\E[1m'
color_reset='\E[0m'
color_bold='\E[1m'
@@
-15,11
+17,13
@@
lttng_processes="$("$PGREP" -l 'lttng|gen-ust-.+')"
if [ $? -eq 0 ]; then
pids="$(cut -d ' ' -f 1 <<< "$lttng_processes" | tr '\n' ' ')"
if [ $? -eq 0 ]; then
pids="$(cut -d ' ' -f 1 <<< "$lttng_processes" | tr '\n' ' ')"
- echo -e "${color_
warn}Warning
: the following LTTng processes were detected running on the system:$color_reset"
+ echo -e "${color_
error}Error
: the following LTTng processes were detected running on the system:$color_reset"
echo
echo "$lttng_processes"
echo
echo -e "Here's how to kill them: ${color_bold}kill -9 $pids$color_reset"
echo
echo "$lttng_processes"
echo
echo -e "Here's how to kill them: ${color_bold}kill -9 $pids$color_reset"
- echo -e "${color_warn}If you leave them alive, some tests could fail.$color_reset"
echo
echo
+ echo "The test suite will not run in the presence of those processes since its result may not be reliable."
+ echo
+ exit 1
fi
fi
This page took
0.024637 seconds
and
4
git commands to generate.