aboutsummaryrefslogtreecommitdiffstats
path: root/t_install_iso
diff options
context:
space:
mode:
Diffstat (limited to 't_install_iso')
-rw-r--r--t_install_iso/010_check_autorun.t16
-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.t10
4 files changed, 14 insertions, 16 deletions
diff --git a/t_install_iso/010_check_autorun.t b/t_install_iso/010_check_autorun.t
index af8f4b9..ce6000a 100644
--- a/t_install_iso/010_check_autorun.t
+++ b/t_install_iso/010_check_autorun.t
@@ -30,20 +30,18 @@ my $name = basename($image_path);
bail_on_fail;
-set_failure_handler( sub {
+set_failure_handler(sub {
print "umount iso\n";
system 'umount /media/iso_check; rm -r /media/iso_check';
});
-# Autorun is on CD AND DVD
-#my %info = Tools::parse_mageia_iso_name($name);
-#skip 'Autorun is only on DVDs.', 13 unless $info{"medium"} eq 'DVD';
-
#
-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");
+# TODO check media name in autorun.inf (for Windows)
+
#
my $lines = `cat -e /media/iso_check/autorun.inf | wc -l`;
my $num = `cat -e /media/iso_check/autorun.inf | grep "\\^M" | wc -l`;
@@ -52,9 +50,9 @@ chomp($lines);
my $last = `cat -e /media/iso_check/autorun.inf | tail -n 1 | grep "\\^M" | wc -l`;
# TODO rewrite this
-if ( ($lines != $num && $lines - 1 != $num)
- || ($lines == 0)
- || ($lines -1 == $num && $last == 1)) {
+if ($lines != $num && $lines - 1 != $num
+ || $lines == 0
+ || $lines - 1 == $num && $last == 1) {
fail('autorun.inf valid EOL chars');
} else {
pass('autorun.inf valid EOL chars');
diff --git a/t_install_iso/012_check_ids.t b/t_install_iso/012_check_ids.t
index 3a13307..b7161af 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 b87f4a0..f7c9a7a 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 3678059..d65e2bc 100644
--- a/t_install_iso/016_check_pubkey.t
+++ b/t_install_iso/016_check_pubkey.t
@@ -39,17 +39,17 @@ 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";
+ 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";
#$url .= "-cooker" if !$finale;
- $pubkey &= check_key($path, $url, $media, $info{"arch"}) if -r $path && -r $url;
+ $pubkey &= check_key($path, $url, $media, $info{arch}) if -r $path && -r $url;
}
elsif ($media ne 'media_info') {
foreach my $arch ("i586", "x86_64") {