+my $installed = $ENV{INSTALLED_TESTS};
+
+my @base_command;
+if ($installed) {
+ ok(1, "running installed");
+ @base_command = qw(ikiwiki);
+}
+else {
+ ok(! system("make -s ikiwiki.out"));
+ @base_command = qw(perl -I. ./ikiwiki.out
+ --underlaydir=underlays/basewiki
+ --set underlaydirbase=underlays
+ --templatedir=templates);
+}
+