From db3f6c1b02f18418f9a8d97a5226d60cf5bbb258 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 5 Mar 2020 08:28:31 -0800 Subject: [PATCH] Tweak _collect_data services collection grep When there's a failed service we get a stupid bullet-point char at the start of its line, and all the other lines are space- padded to match indentation. Which is annoying! This (I hope) ditches that crap without losing anything of value. Signed-off-by: Adam Williamson --- tests/_collect_data.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_collect_data.pm b/tests/_collect_data.pm index f09d481d..51a03b52 100644 --- a/tests/_collect_data.pm +++ b/tests/_collect_data.pm @@ -15,7 +15,7 @@ sub run { upload_logs '/var/tmp/free.log'; assert_script_run 'df > /var/tmp/df.log'; upload_logs '/var/tmp/df.log'; - assert_script_run 'systemctl -t service --no-pager --no-legend | grep -o ".*\.service" > /var/tmp/services.log'; + assert_script_run 'systemctl -t service --no-pager --no-legend | grep -o "[[:graph:]]*\.service" > /var/tmp/services.log'; upload_logs '/var/tmp/services.log'; }