diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-06-07 22:14:04 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-06-07 22:14:04 -0700 |
commit | f1eed778e47604670e186d48c02659050aadf566 (patch) | |
tree | 5ee509f5fb99e0ebb42fb62cd14cfe41f6bbb429 /index.php | |
parent | 4ba02ad720de146ad2558ae67870986925e0a2a2 (diff) |
Tweak the test setup code to always copy database.php; something is
going wrong that's nuking test/var/database.php -- I'll figure that
out, but in the meantime we can make this code more robust.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -64,11 +64,12 @@ if (PHP_SAPI == "cli") { case "test": array_splice($_SERVER["argv"], 1, 1, "gallery_unit_test"); define("TEST_MODE", 1); - define("VARPATH", realpath("test/var") . "/"); - if (!is_dir("test/var/logs")) { + if (!is_dir("test/var")) { + @mkdir("test/var", 0777, true); @mkdir("test/var/logs", 0777, true); - @copy("var/database.php", VARPATH . "database.php"); } + @copy("var/database.php", "test/var/database.php"); + define("VARPATH", realpath("test/var") . "/"); break; default: |