[Fai-commit] r6731 - in test-suite/scenarios/fai40-testing: package_config tests
Michael Tautschnig
mt at alioth.debian.org
Sat Oct 22 16:29:51 UTC 2011
Author: mt
Date: 2011-10-22 16:29:51 +0000 (Sat, 22 Oct 2011)
New Revision: 6731
Added:
test-suite/scenarios/fai40-testing/package_config/fai40
test-suite/scenarios/fai40-testing/tests/fai40_TEST
Modified:
test-suite/scenarios/fai40-testing/tests/Faitest.pm
Log:
test: package installation using cupt
Added: test-suite/scenarios/fai40-testing/package_config/fai40
===================================================================
--- test-suite/scenarios/fai40-testing/package_config/fai40 (rev 0)
+++ test-suite/scenarios/fai40-testing/package_config/fai40 2011-10-22 16:29:51 UTC (rev 6731)
@@ -0,0 +1,3 @@
+PACKAGES cupt
+htop
+
Modified: test-suite/scenarios/fai40-testing/tests/Faitest.pm
===================================================================
--- test-suite/scenarios/fai40-testing/tests/Faitest.pm 2011-10-22 16:14:25 UTC (rev 6730)
+++ test-suite/scenarios/fai40-testing/tests/Faitest.pm 2011-10-22 16:29:51 UTC (rev 6731)
@@ -92,4 +92,21 @@
}
}
+sub packageStatus {
+
+ my ($pkg, $expected) = @_;
+
+ my ($value) = qx#dpkg -l $pkg |grep -w "$pkg"# =~ m/^(\S+)\s+$pkg\s+/i;
+
+ if ($value eq $expected) {
+ print LOGFILE "Package check for $pkg matches $expected -- success\n";
+ return 0;
+ } else {
+ print LOGFILE "Package check for $pkg -- FAILED.\n Expect <$expected>\n Found <$value>\n";
+
+ $errors++;
+ return 1;
+ }
+}
+
1;
Added: test-suite/scenarios/fai40-testing/tests/fai40_TEST
===================================================================
--- test-suite/scenarios/fai40-testing/tests/fai40_TEST (rev 0)
+++ test-suite/scenarios/fai40-testing/tests/fai40_TEST 2011-10-22 16:29:51 UTC (rev 6731)
@@ -0,0 +1,41 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use Faitest;
+package FAITEST;
+
+setup_test();
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+# now comes the test itself
+
+&packageStatus("htop", "ii");
+
+exit printresult();
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+__END__
+
+=head1 NAME
+
+fai40_TEST - regression test for FAI 4.0
+
+=head1 SYNOPSIS
+
+fai40_TEST checks parts of the roadmap for FAI 4.0. Presently here we check
+
+ - whether the package htop was installed (using cupt, as defined by
+ package_config/fai40)
+
+ Options:
+ -help simple help
+ -verbose=n increase verbosity of test script
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-help>
+simple help
+
+=item B<-verbose>
+increase verbosity of test script
Property changes on: test-suite/scenarios/fai40-testing/tests/fai40_TEST
___________________________________________________________________
Added: svn:executable
+ *
More information about the Fai-commit
mailing list