Commit 8b82ad27 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Put test directories of d8-os tests into /tmp/.

Review URL: http://codereview.chromium.org/7835040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 09c66d20
...@@ -683,7 +683,7 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate() { ...@@ -683,7 +683,7 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate() {
global_template->Set(String::New("lol_is_enabled"), False()); global_template->Set(String::New("lol_is_enabled"), False());
#endif #endif
#ifndef V8_SHARED #if !defined(V8_SHARED) && !defined(_WIN32) && !defined(_WIN64)
Handle<ObjectTemplate> os_templ = ObjectTemplate::New(); Handle<ObjectTemplate> os_templ = ObjectTemplate::New();
AddOSMethods(os_templ); AddOSMethods(os_templ);
global_template->Set(String::New("os"), os_templ); global_template->Set(String::New("os"), os_templ);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
// implemented on Windows, and even if it were then many of the things // implemented on Windows, and even if it were then many of the things
// we are calling would not be available. // we are calling would not be available.
var TEST_DIR = "d8-os-test-directory-" + ((Math.random() * (1<<30)) | 0); var TEST_DIR = "/tmp/d8-os-test-directory-" + ((Math.random() * (1<<30)) | 0);
function arg_error(str) { function arg_error(str) {
...@@ -64,7 +64,7 @@ if (this.os && os.system) { ...@@ -64,7 +64,7 @@ if (this.os && os.system) {
os.chdir(TEST_DIR); os.chdir(TEST_DIR);
try { try {
// Check the chdir worked. // Check the chdir worked.
os.system('ls', ['../' + TEST_DIR]); os.system('ls', [TEST_DIR]);
// Simple create dir. // Simple create dir.
os.mkdirp("dir"); os.mkdirp("dir");
// Create dir in dir. // Create dir in dir.
...@@ -144,7 +144,6 @@ if (this.os && os.system) { ...@@ -144,7 +144,6 @@ if (this.os && os.system) {
//} //}
} }
} finally { } finally {
os.chdir("..");
os.system("rm", ["-r", TEST_DIR]); os.system("rm", ["-r", TEST_DIR]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment