diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index ac5866ed8..77f5e145b 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -41,7 +41,7 @@ sub runcmd my $rc = 0; $::RUNCMD_RC = 0; my $outref = []; - print "[[MG]] About to execute $cmd"; + print " [[MG]] About to execute $cmd\n"; @$outref = `$cmd 2>&1`; if ($?) { @@ -327,8 +327,8 @@ sub build_xcat_core{ #-------------------------------------------------------- sub install_xcat{ - my @cmds = ("pwd", - "cd ./../../xcat-core && sudo ./mklocalrepo.sh", + my @cmds = ("sudo pwd", + "sudo cd ./../../xcat-core && sudo ./mklocalrepo.sh", "sudo chmod 777 /etc/apt/sources.list", "sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep bionic main\" >> /etc/apt/sources.list", "sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep bionic main\" >> /etc/apt/sources.list", @@ -340,6 +340,7 @@ sub install_xcat{ @output = runcmd("cd $dir"); if($::RUNCMD_RC){ print RED "[MG] cd to $dir ...[Failed]\n"; + print "[MG] RC was $::RUNCMD_RC\n"; print "[MG] error message:\n"; print Dumper \@output; } @@ -348,6 +349,7 @@ sub install_xcat{ @output = runcmd("cd $dir"); if($::RUNCMD_RC){ print RED "[MG] cd to $dir ...[Failed]\n"; + print "[MG] RC was $::RUNCMD_RC\n"; print "[MG] error message:\n"; print Dumper \@output; } @@ -358,11 +360,11 @@ sub install_xcat{ my $workspace = $ENV{RUNNER_WORKSPACE}; @output = runcmd("cd $workspace"); - print "[MG] {4} running cd $workspace\n"; + print "[MG] {4} RUNNER_WORKSPACE running cd $workspace\n"; + print "[MG] RC was $::RUNCMD_RC\n"; print "[MG] cd output:\n"; print Dumper \@output; - print "[MG] RUNNER_WORKSPACE=$workspace\n"; foreach my $cmd (@cmds){ print "[install_xcat] running $cmd\n"; @output = runcmd("$cmd");