stas 2003/08/07 09:57:39
Modified: t/apr-ext uuid.t
Log:
run external apr tests only if apr-config was found (without which APR.so
won't be linked against libapr/libaprutil
Revision Changes Path
1.2 +16 -5 modperl-2.0/t/apr-ext/uuid.t
Index: uuid.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/apr-ext/uuid.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- uuid.t 28 Jul 2003 17:33:30 -0000 1.1
+++ uuid.t 7 Aug 2003 16:57:39 -0000 1.2
@@ -1,15 +1,26 @@
-
-use Apache::Test;
+use strict;
+use warnings FATAL => 'all';
use blib;
use Apache2;
-use APR ();
-use APR::UUID ();
+use Apache::Test;
+use Apache::Build ();
+
+my $build = Apache::Build->build_config;
+
+# XXX: only when apr-config is found APR will be linked against
+# libapr/libaprutil, probably need a more intuitive method for this
+# prerequisite
+my $has_apr_config = $build->{apr_config_path};
+
+plan tests => 3,
+ have {"the build couldn't find apr-config" => $has_apr_config};
my $dummy_uuid = 'd48889bb-d11d-b211-8567-ec81968c93c6';
-plan tests => 3;
+require APR;
+require APR::UUID;
#XXX: apr_generate_random_bytes may block forever on /dev/random
# my $uuid = APR::UUID->new->format;