Skip to content

Commit

Permalink
Update Perl::Tidy to 20250214
Browse files Browse the repository at this point in the history
Match changes in os-autoinst:
os-autoinst/os-autoinst#2667

Perform a full tidy run and change is_sle ? ... to is_sle() ? ... in
lib/oscap_tests.pm and tests/console/clamav.pm to avoid syntax errors
(false positive?).
  • Loading branch information
Vogtinator committed Feb 24, 2025
1 parent 92ed83f commit 37feb36
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
echo " requires 'Code::DRY';" >> cpanfile
echo " requires 'Date::Parse';" >> cpanfile
echo " requires 'Regexp::Common';" >> cpanfile
echo " requires 'Perl::Tidy', '== 20240511';" >> cpanfile
echo " requires 'Perl::Tidy', '== 20250214';" >> cpanfile
make prepare
- name: Run ${{ matrix.test }} tests
env:
Expand Down
2 changes: 1 addition & 1 deletion lib/LTP/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ sub init_ltp_tests {
# Disabling IPv4 is needed for iptables tests (net.tcp_cmds).
# Disabling IPv6 is needed for ICMPv6 tests (net.ipv6).
# This must be done after stopping network service.
my $disable_iptables_script = << 'EOF';
my $disable_iptables_script = <<'EOF';
iptables -P INPUT ACCEPT;
iptables -P OUTPUT ACCEPT;
iptables -P FORWARD ACCEPT;
Expand Down
10 changes: 5 additions & 5 deletions lib/Mitigation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ sub init_xml {
file_name => '/tmp/junit.xml'
);
%args = @_;
my $xml_content = << "EOF";
my $xml_content = <<"EOF";
<testsuites error='0' failures='0' name=\\"$args{testsuites_name}\\" skipped='0' tests='0' time=''>
</testsuites>
EOF
Expand All @@ -794,7 +794,7 @@ sub append_ts2_xml {
file_name => '/tmp/junit.xml'
);
%args = @_;
my $cmd_append_ts2_xml = << "EOF";
my $cmd_append_ts2_xml = <<"EOF";
xmlstarlet ed -P -L -s /testsuites -t elem -n testsuite -v '' \\
-i "/testsuites/testsuite[last()]" -t attr -n error -v 0 \\
-i "/testsuites/testsuite[last()]" -t attr -n failures -v 0 \\
Expand All @@ -818,7 +818,7 @@ sub update_tss_attr {
value => 0
);
%args = @_;
my $cmd_update_tss_attr = << "EOF";
my $cmd_update_tss_attr = <<"EOF";
xmlstarlet ed -L -u /testsuites/\@$args{attr} -v $args{value} $args{file_name} \\
EOF
assert_script_run($cmd_update_tss_attr, 200);
Expand All @@ -833,7 +833,7 @@ sub update_ts_attr {
value => 0
);
%args = @_;
my $cmd_update_ts_attr = << "EOF";
my $cmd_update_ts_attr = <<"EOF";
xmlstarlet ed -L -u "/testsuites/testsuite[last()]/\@$args{attr}" -v $args{value} $args{file_name} \\
EOF
assert_script_run($cmd_update_ts_attr, 200);
Expand All @@ -849,7 +849,7 @@ sub insert_tc2_xml {
sys_err => ''
);
%args = @_;
my $cmd_insert_tc2_xml = << "EOF";
my $cmd_insert_tc2_xml = <<"EOF";
xmlstarlet ed -L -s "/testsuites/testsuite[last()]" -t elem -n testcase -v "" \\
-s "/testsuites/testsuite[last()]/testcase[last()]" -t elem -n system-err -v "$args{sys_err}" \\
-s "/testsuites/testsuite[last()]/testcase[last()]" -t elem -n system-out -v "$args{sys_output}" \\
Expand Down
2 changes: 1 addition & 1 deletion lib/containers/bats.pm
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ sub patch_logfile {
}

sub fix_tmp {
my $override_conf = << 'EOF';
my $override_conf = <<'EOF';
[Unit]
ConditionPathExists=/var/tmp
Expand Down
2 changes: 1 addition & 1 deletion lib/hpc/cluster.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ our @EXPORT = qw(
);

sub provision_cluster ($self) {
my $config = << "EOF";
my $config = <<"EOF";
sed -i '/^DHCLIENT_SET_HOSTNAME.*/c\\DHCLIENT_SET_HOSTNAME="no"' /etc/sysconfig/network/dhcp
EOF
assert_script_run($_) foreach (split /\n/, $config);
Expand Down
2 changes: 1 addition & 1 deletion lib/hpc/configs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Prepare slurmdbd.conf based on test requirements and settings
sub prepare_slurmdb_conf ($self) {
my @cluster_compute_nodes = $self->slave_node_names();

my $config = << "EOF";
my $config = <<"EOF";
sed -i "/^DbdAddr.*/c\\#DbdAddr" /etc/slurm/slurmdbd.conf
sed -i "/^DbdHost.*/c\\DbdHost=$cluster_compute_nodes[-1]" /etc/slurm/slurmdbd.conf
sed -i "/^#StorageHost.*/c\\StorageHost=$cluster_compute_nodes[-1]" /etc/slurm/slurmdbd.conf
Expand Down
4 changes: 2 additions & 2 deletions lib/oscap_tests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,10 @@ sub oscap_security_guide_setup {
}
# compliance-as-code-compiled or ComplianceAsCode repository master branch
if (($use_content_type == 2) or ($use_content_type == 3)) {
my $ds_file_name = is_sle ? $ssg_sle_ds : $ssg_tw_ds;
my $ds_file_name = is_sle() ? $ssg_sle_ds : $ssg_tw_ds;
replace_ds_file(1, $ds_file_name);

my $xccdf_file_name = is_sle ? $ssg_sle_xccdf : $ssg_tw_xccdf;
my $xccdf_file_name = is_sle() ? $ssg_sle_xccdf : $ssg_tw_xccdf;
replace_xccdf_file(1, $xccdf_file_name);

if ($ansible_remediation == 1) {
Expand Down
2 changes: 1 addition & 1 deletion lib/x11test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ sub open_libreoffice_options {
# get email account information for Evolution test cases
sub getconfig_emailaccount {
my ($self) = @_;
my $local_config = << 'END_LOCAL_CONFIG';
my $local_config = <<'END_LOCAL_CONFIG';
[internal_account_A]
user = admin
mailbox = admin@localhost
Expand Down
2 changes: 1 addition & 1 deletion tests/console/clamav.pm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ sub run {

# Initialize and download ClamAV database
# First from local mirror, it's much faster, then from official clamav db
my $host = is_sle ? 'openqa.oqa.prg2.suse.org' : 'openqa.opensuse.org';
my $host = is_sle() ? 'openqa.oqa.prg2.suse.org' : 'openqa.opensuse.org';
assert_script_run("sed -i '/mirror1/i PrivateMirror $host/assets/repo/fixed/cvd' /etc/freshclam.conf");
assert_script_run('freshclam', timeout => 300);

Expand Down
2 changes: 1 addition & 1 deletion tests/hpc/hpc_support.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sub run {
systemctl("is-active mariadb");

# allow hostnames other than localhost
my $config = << "EOF";
my $config = <<"EOF";
sed -i "/^bind-address.*/c\\#bind-address" /etc/my.cnf
EOF
assert_script_run($_) foreach (split /\n/, $config);
Expand Down
2 changes: 1 addition & 1 deletion tests/hpc/slurm_db.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sub run ($self) {
systemctl("is-active $mariadb_service");

# allow hostnames other than localhost
my $config = << "EOF";
my $config = <<"EOF";
sed -i "/^bind-address.*/c\\#bind-address" /etc/my.cnf
EOF
assert_script_run($_) foreach (split /\n/, $config);
Expand Down
2 changes: 1 addition & 1 deletion tests/kernel_performance/install_qatestset.pm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ sub setup_environment {

# workaround to prevent network interface random order
if (check_var('PROJECT_M_ROLE', 'PROJECT_M_ABAP')) {
my $service_file = << 'EOF';
my $service_file = <<'EOF';
[Unit]
Description=Load bnxt_en driver manually
After=sshd.service
Expand Down
2 changes: 1 addition & 1 deletion tests/shutdown/cleanup_before_shutdown.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sub run {
# Please see https://freedesktop.org/wiki/Software/systemd/Debugging/#index2h1 for the details.
# Boot options that are required to make logs more detalized are located in 'bootloader_setup.pm'
if (get_var('DEBUG_SHUTDOWN')) {
my $script = << "END_SCRIPT";
my $script = <<"END_SCRIPT";
echo -e '#!/bin/sh
echo --- dmesg log --- > /dev/$serialdev
dmesg -T >> /dev/$serialdev
Expand Down
2 changes: 1 addition & 1 deletion tests/yast2_cmd/yast_dns_server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ sub cmd_handle {
}
else {
all { $output =~ m/\Q$_\E/i; } values %args;
} });
} });
}

sub run {
Expand Down

0 comments on commit 37feb36

Please sign in to comment.