diff options
author | Romain d'Alverny <rda@mageia.org> | 2011-12-05 22:55:33 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2011-12-05 22:55:33 +0000 |
commit | 586a59e00d00f2b1347f015911545b722f2d1f8b (patch) | |
tree | 0410ef511a253d5f94298c7f130527a4672c230f /t/000_test_env.t | |
parent | 9412e3c3beb6d547f0932d4e1c19a9dfb0cd4378 (diff) | |
download | isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar.gz isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar.bz2 isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar.xz isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.zip |
First import, test suite attempt for built ISOs
Code heavily taken from previous dams work,
reorganized in a test suite to better separate test cases.
Does basic things already (in t/).
Needs more fixes (esp. in t_install_iso/).
Diffstat (limited to 't/000_test_env.t')
-rw-r--r-- | t/000_test_env.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/000_test_env.t b/t/000_test_env.t new file mode 100644 index 0000000..9484e5b --- /dev/null +++ b/t/000_test_env.t @@ -0,0 +1,24 @@ +# +# These tests check that the testing environment is complete. +# + +use Test::Most; + +bail_on_fail; + +my ($image_path) = @ARGV; + +# FIXME why need to be root? for mounting the ISO only? +# FIXME USER or USERNAME? +is($ENV{USERNAME}, 'root', "Current user is root."); + +# TODO move this elsewhere maybe? +sub pkg_check { my ($pkg) = @_; return system("rpm -q $pkg >/dev/null"); } + +my @packages = qw(cdrkit cdrkit-isotools mono gnupg); + +foreach my $p (@packages) { + is(pkg_check($p), 0, sprintf("%s is installed.", $p)); +} + +done_testing(); |