From 675f826d4a85c1cd26e30d0f8ef52d5b592c0d1c Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 6 Nov 2015 00:16:24 +0100 Subject: [bug] [jessie] check for 1 stunnel instance only - Resolves: #7574 --- tests/helpers/os_helper.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/helpers') diff --git a/tests/helpers/os_helper.rb b/tests/helpers/os_helper.rb index aad67dda..c57300e2 100644 --- a/tests/helpers/os_helper.rb +++ b/tests/helpers/os_helper.rb @@ -9,7 +9,10 @@ class LeapTest output.each_line.map{|line| pid = line.split(' ')[0] process = line.gsub(/(#{pid} |\n)/, '') - if process =~ /pgrep --full --list-name/ + # filter out pgrep cmd itself + # on wheezy hosts, the "process" var contains the whole cmd including all parameters + # on jessie hosts, it only contains the first cmd (which is the default sheel invoked by 'sh') + if process =~ /^sh/ nil else {:pid => pid, :process => process} @@ -35,4 +38,4 @@ class LeapTest end end -end \ No newline at end of file +end -- cgit v1.2.3