aboutsummaryrefslogtreecommitdiffstats
path: root/t_install_iso
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-12-10 19:28:30 +0000
committerRomain d'Alverny <rda@mageia.org>2011-12-10 19:28:30 +0000
commit1e65efa6a3d996c34c902f2b04257307c2175776 (patch)
tree635ae0d5dc31d6bf186b0dc50a8d510d49474f2e /t_install_iso
parentfa4a16119ca7e744aee9b29b8a70ce01aa2516f0 (diff)
downloadisocheck-1e65efa6a3d996c34c902f2b04257307c2175776.tar
isocheck-1e65efa6a3d996c34c902f2b04257307c2175776.tar.gz
isocheck-1e65efa6a3d996c34c902f2b04257307c2175776.tar.bz2
isocheck-1e65efa6a3d996c34c902f2b04257307c2175776.tar.xz
isocheck-1e65efa6a3d996c34c902f2b04257307c2175776.zip
more code style fixes (perl_checker & tv)
Diffstat (limited to 't_install_iso')
-rw-r--r--t_install_iso/010_check_autorun.t10
-rw-r--r--t_install_iso/012_check_ids.t2
-rw-r--r--t_install_iso/013_check_rpms.t2
-rw-r--r--t_install_iso/016_check_pubkey.t24
4 files changed, 18 insertions, 20 deletions
diff --git a/t_install_iso/010_check_autorun.t b/t_install_iso/010_check_autorun.t
index ce6000a..ce607fe 100644
--- a/t_install_iso/010_check_autorun.t
+++ b/t_install_iso/010_check_autorun.t
@@ -36,7 +36,7 @@ set_failure_handler(sub {
});
#
-ok -r "/media/iso_check/autorun.inf", 'autorun.inf is there';
+ok(-r "/media/iso_check/autorun.inf", 'autorun.inf is there');
BAIL_OUT('Autorun stuff is missing anyway.') if !(-r "/media/iso_check/autorun.inf");
@@ -62,23 +62,23 @@ if ($lines != $num && $lines - 1 != $num
my $directory;
$directory = "/media/iso_check/autorun/" if -r "/media/iso_check/autorun";
$directory = "/media/iso_check/dosutils/autorun/" if -r "/media/iso_check/dosutils/autorun";
-ok -r $directory, 'dosutils directory is there';
+ok(-r $directory, 'dosutils directory is there');
#
my $exe = $directory . "autorun.exe";
-ok -r $exe, 'autorun.exe is there';
+ok(-r $exe, 'autorun.exe is there');
BAIL_OUT('autorun.exe is not here.') if !(-r $exe);
#
my $file = $directory . "autorun.ico";
$file = $directory . "mageia.ico" if !(-r $file);
-ok -r $file, 'autorun.ico is there';
+ok(-r $file, 'autorun.ico is there');
#
foreach my $a ("de-DE/", "es-ES/", "fr-FR/", "it-IT/", "pt-BR/", "ru-RU/", "zh-CN/") {
$file = $directory . $a . "autorun.resources.dll";
- ok -r $file, "$file is there";
+ ok(-r $file, "$file is there");
}
done_testing();
diff --git a/t_install_iso/012_check_ids.t b/t_install_iso/012_check_ids.t
index b7161af..56eed85 100644
--- a/t_install_iso/012_check_ids.t
+++ b/t_install_iso/012_check_ids.t
@@ -36,6 +36,6 @@ $valid2 = -r "/media/iso_check/x86_64/isolinux/pci.ids" if -r "/media/iso_check/
$valid &= $valid2 if -r "/media/iso_check/x86_64" && -r "/media/iso_check/i586";
$valid = $valid2 if -r "/media/iso_check/x86_64" && !$valid;
-ok $valid, 'HDT can find pci.ids.';
+ok($valid, 'HDT can find pci.ids.');
done_testing();
diff --git a/t_install_iso/013_check_rpms.t b/t_install_iso/013_check_rpms.t
index f7c9a7a..cd329ac 100644
--- a/t_install_iso/013_check_rpms.t
+++ b/t_install_iso/013_check_rpms.t
@@ -38,7 +38,7 @@ while ($pkg = <$list>) {
$sign = '';
chomp($pkg);
$sign = `rpm -K $pkg | grep 'gpg OK'`;
- ok $sign, "$pkg is correctly signed.";
+ ok($sign, "$pkg is correctly signed.");
$valid = 0 if !$sign;
}
diff --git a/t_install_iso/016_check_pubkey.t b/t_install_iso/016_check_pubkey.t
index d65e2bc..05eed86 100644
--- a/t_install_iso/016_check_pubkey.t
+++ b/t_install_iso/016_check_pubkey.t
@@ -39,24 +39,22 @@ my $media;
system "ls /media/iso_check/i586/media/ > temp_media_on_iso.log" if -r "/media/iso_check/i586/media/";
system "ls /media/iso_check/x86_64/media/ >> temp_media_on_iso.log" if -r "/media/iso_check/x86_64/media/";
-ok -r "temp_media_on_iso.log", "Got a log for media contents";
+ok(-r "temp_media_on_iso.log", "Got a log for media contents");
-open(my $file, "temp_media_on_iso.log") if -r "temp_media_on_iso.log";
-
-while ($media = <$file>) {
- chomp($media);
- if ($info{arch} ne "dual" && $media ne 'media_info') {
- $path = "/media/iso_check/" . $info{arch} . "/media/$media/media_info/pubkey";
- $url = "pubkey/" . $info{arch} . "-$media-pubkey";
+foreach (cat_("temp_media_on_iso.log")) {
+ chomp;
+ if ($info{arch} ne "dual" && $_ ne 'media_info') {
+ $path = "/media/iso_check/" . $info{arch} . "/media/$_/media_info/pubkey";
+ $url = "pubkey/" . $info{arch} . "-$_-pubkey";
#$url .= "-cooker" if !$finale;
- $pubkey &= check_key($path, $url, $media, $info{arch}) if -r $path && -r $url;
+ $pubkey &= check_key($path, $url, $_, $info{arch}) if -r $path && -r $url;
}
- elsif ($media ne 'media_info') {
+ elsif ($_ ne 'media_info') {
foreach my $arch ("i586", "x86_64") {
- $path = "/media/iso_check/$arch/media/$media/media_info/pubkey";
- $url = "pubkey/$arch-$media-pubkey";
+ $path = "/media/iso_check/$arch/media/$_/media_info/pubkey";
+ $url = "pubkey/$arch-$_-pubkey";
#$url .= "-cooker" if !$finale;
- -r $path and -r $url and $pubkey &= check_key($path, $url, $media, $arch);
+ -r $path and -r $url and $pubkey &= check_key($path, $url, $_, $arch);
}
}
}