2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-04-11 19:31:31 +00:00

revert: Revert changes in github_action_xcat_test.pl

- And Cosmetic change in Utils.pm

Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst Selli
2026-01-26 12:57:58 -03:00
parent a8d80ad820
commit 32acf9af04
2 changed files with 7 additions and 30 deletions

View File

@@ -53,23 +53,6 @@ sub runcmd
}
#--------------------------------------------------------
# Fuction name: echocmd
# Description: run a command after 'cmd' label in one case
# the output is echoed to the terminal
# Attributes:
# Return code:
# $::RUNCMD_RC : the return code of command
#--------------------------------------------------------
sub echocmd
{
my ($cmd) = @_;
$::RUNCMD_RC = 0;
system($cmd);
$::RUNCMD_RC = $? >> 8;
undef;
}
#--------------------------------------------------------
# Fuction name: get_files_recursive
# Description: Search all file in one directory recursively
@@ -296,16 +279,11 @@ sub send_back_comment{
sub build_xcat_core{
my @output;
my $dest = $ENV{RUNNER_WORKSPACE};
my $cmd = <<"EOF";
find . -name changelog.dch -delete;
set -x
sudo DEBEMAIL="\$DEBEMAIL" DEBFULLNAME="\$DEBFULLNAME" \\
./build-ubunturepo -c UP=0 BUILDALL=1 GPGSIGN=0 DEST="$dest"
EOF
echocmd("$cmd");
my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1 GPGSIGN=0";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
my $lastline = $output[-1];
$lastline =~ s/[\r\n\t\\"']*//g;
print "[build_xcat_core] $cmd ....[Failed]\n";
$check_result_str .= "> **BUILD ERROR**, Please click ``Details`` label in ``Merge pull request`` box for detailed information";
print $check_result_str;
@@ -333,12 +311,11 @@ sub install_xcat{
"sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep bionic main\" >> /etc/apt/sources.list",
"sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -",
"sudo apt-get -qq --allow-insecure-repositories update");
chdir "$ENV{RUNNER_WORKSPACE}/debsfeat/prepare-merge-upstream/xcat-core";
my $cwd = Cwd::cwd();
chdir $ENV{RUNNER_WORKSPACE};;
my @output;
foreach my $cmd (@cmds){
print "[install_xcat] running $cmd at $cwd\n";
print "[install_xcat] running $cmd\n";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
print RED "[install_xcat] $cmd. ...[Failed]\n";

View File

@@ -2228,7 +2228,7 @@ sub CheckVersion
Example:
my $os=(xCAT::Utils->osver{ ...}
Comments:
none
none
=cut