summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-07-24 14:38:17 +0000
committervarac <varacanero@zeromail.org>2013-07-24 14:38:17 +0000
commit1ab9e7eaf2a5b35141539620122296f6c1333238 (patch)
tree9fc3160eecd4c90d2a2a370750ad86f2ddf79093
parentf03d615b8f8addc72f99b474f1f62f820c39e875 (diff)
CI: check for existing processes (Feature #3242)
-rwxr-xr-xleap-platform-test14
1 files changed, 6 insertions, 8 deletions
diff --git a/leap-platform-test b/leap-platform-test
index 3f76b4f..366132e 100755
--- a/leap-platform-test
+++ b/leap-platform-test
@@ -325,15 +325,13 @@ else
nodes=$nodelist
fi
-# check if another process is already running for given nodes
-for i in $nodes; do
- procs=`pgrep -fc "leap-platform-test.*$i"`
- if [ $procs -gt 1 ]; then
- echo "Another process is already running for node $i - exiting."
- exit 1
- fi
-done
+# check if another process is already running with same config file
+procs=`pgrep -fc "leap-platform-test.*-c.*$config"`
+if [ $procs -gt 1 ]; then
+ echo "Other process(es) found running for config $config - exiting."
+ exit 1
+fi
case $cmd in
add_nodes) add_nodes "$nodes";;