From c0a7154bf659daef11d206a269b953c49871d909 Mon Sep 17 00:00:00 2001 From: Weihua Hu Date: Tue, 11 Dec 2018 13:42:54 +0800 Subject: [PATCH] fix issue 5881: xcattest failed to add component directory name as default label (#5882) --- xCAT-test/xcattest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 2c8894661..500f33b08 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -2132,7 +2132,8 @@ sub calculate_case_belong_to_which_cmd { my $file_path = shift; my $command = undef; - if ($file_path =~ "\/autotest\/testcase") { + $file_path =~ s|[\/]{2,}|\/|g; + if ($file_path =~ /\/autotest\/testcase/) { my @path_str = split("/", $file_path); #print Dumper \@path_str; my $index = 0;