$dir = "/tmp/ikiwiki-test-bzr.$$";
my $bzr=`which bzr`;
chomp $bzr;
- if (! -x $bzr || ! mkdir($dir)) {
+ if (! -x $bzr) {
eval q{
- use Test::More skip_all => "bzr not available or could not make test dir"
+ use Test::More skip_all => "bzr not available"
}
}
+ if (! mkdir($dir)) {
+ die $@;
+ }
}
use Test::More tests => 17;
IkiWiki::loadplugins();
IkiWiki::checkconfig();
+# XXX
+# This is a workaround for bzr's new requirement that bzr whoami be run
+# before committing. This makes the test suite work with an unconfigured
+# bzr, but ignores the need to have a properly configured bzr before
+# using ikiwiki with bzr.
+$ENV{HOME}=$dir;
+system 'bzr whoami test@example.com';
+
system "bzr init $config{srcdir}";
use CGI::Session;