From 78bc81874855021d7852ad2a7a94fcbbf3ae29c5 Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Wed, 31 May 2017 01:26:43 -0400 Subject: [PATCH 1/2] Modify 2 bugs for xcattest --- xCAT-test/xcattest | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 7566e65d1..c3afbe490 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1175,11 +1175,11 @@ sub run_case { #to run singal line command - $cmd = getfunc($cmd->[0]); - @output = &runcmd($cmd); + $cmd->[0] = getfunc($cmd->[0]); + @output = &runcmd($cmd->[0]); $rc = $::RUNCMD_RC; - log_this($running_log_fd, "RUN:$cmd [$runstartstr]"); - push(@caselog, "RUN:$cmd [$runstartstr]"); + log_this($running_log_fd, "RUN:$cmd->[0] [$runstartstr]"); + push(@caselog, "RUN:$cmd->[0] [$runstartstr]"); } else { #to run multiple lines command @@ -1275,7 +1275,8 @@ sub run_case { if ($cmdcheck) { &runcmd($cmdcheck); $rc = $::RUNCMD_RC; - if ($rc == 1) { + if ($rc != 0 ) { + $failflag = 1; log_this($running_log_fd, "CHECK:output $cmdcheck\t[Failed]"); push(@caselog, "CHECK:output $cmdcheck\t[Failed]"); } elsif ($rc == 0) { From 5056bea7db0a9d2a6378e3630f9a6bbd91c66e6f Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Wed, 31 May 2017 05:13:06 -0400 Subject: [PATCH 2/2] modify typo --- xCAT-test/xcattest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index c3afbe490..2bcbd7956 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1173,7 +1173,7 @@ sub run_case { my $rc = 0; if ($cmdlen == 1) { - #to run singal line command + #to run single line command $cmd->[0] = getfunc($cmd->[0]); @output = &runcmd($cmd->[0]);