]> git.sur5r.net Git - i3/i3/commitdiff
tests: 000-load-deps: bail out when dependencies are not found, test more of them
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 13 Nov 2012 20:03:44 +0000 (21:03 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 13 Nov 2012 20:03:44 +0000 (21:03 +0100)
This should be a better hint for people who forgot to install the
testsuite dependencies :).

testcases/t/000-load-deps.t

index 5dfc5c695501cad0c5c77ef265eec156de00b845..ab93233a23654f368c96d21a2bed6acdc119277e 100644 (file)
@@ -1,10 +1,22 @@
 #!perl
+# vim:ts=4:sw=4:expandtab
 
-use Test::More tests => 2;
+use Test::More;
 
 BEGIN {
-       use_ok( 'X11::XCB::Connection' );
-       use_ok( 'X11::XCB::Window' );
+    my @deps = qw(
+        X11::XCB::Connection
+        X11::XCB::Window
+        AnyEvent
+        AnyEvent::I3
+        IPC::Run
+        ExtUtils::PkgConfig
+        Inline
+        Test::More
+    );
+    for my $dep (@deps) {
+        use_ok($dep) or BAIL_OUT(qq|The Perl module "$dep" could not be loaded. Please see http://build.i3wm.org/docs/testsuite.html#_installing_the_dependencies|);
+    }
 }
 
-diag( "Testing i3, Perl $], $^X" );
+done_testing;