Creates the sandbox.
()
| 493 | * Creates the sandbox. |
| 494 | */ |
| 495 | public static void initSandbox() { |
| 496 | final IOFile sb = sandbox(); |
| 497 | //sb.delete(); |
| 498 | if(!sb.md()) fail("Sandbox could not be created."); |
| 499 | |
| 500 | final String path = sb.path(); |
| 501 | Prop.put(StaticOptions.DBPATH, path + "/data"); |
| 502 | Prop.put(StaticOptions.WEBPATH, path + "/webapp"); |
| 503 | Prop.put(StaticOptions.RESTXQPATH, path + "/webapp"); |
| 504 | Prop.put(StaticOptions.REPOPATH, path + "/repo"); |
| 505 | Prop.put(StaticOptions.SERVERPORT, Integer.toString(DB_PORT)); |
| 506 | context = new Context(); |
| 507 | |
| 508 | // disable loop unrolling and function inlining |
| 509 | context.options.set(MainOptions.UNROLLLIMIT, 0); |
| 510 | context.options.set(MainOptions.INLINELIMIT, 0); |
| 511 | } |
| 512 | |
| 513 | /** |
| 514 | * Removes test databases and closes the database context. |