+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 = ("perl", "-I".getcwd, qw(./ikiwiki.out
+ --underlaydir=underlays/basewiki
+ --set underlaydirbase=underlays
+ --templatedir=templates));
+}
+