Reviewers: rossberg,

Message:
PTAL.


http://codereview.chromium.org/7835040/diff/1/src/d8.cc
File src/d8.cc (right):

http://codereview.chromium.org/7835040/diff/1/src/d8.cc#newcode686
src/d8.cc:686: #if !defined(V8_SHARED) && !defined(_WIN32) &&
!defined(_WIN64)
There is no windows implementation of the os object anyways.

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


Please review this at http://codereview.chromium.org/7835040/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/d8.cc
  M test/mjsunit/d8-os.js


Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 55f1c764028d204a63fc54f5502c5a6fd0390102..5c604368920a35c5aa81feb6818219b59c697a43 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -683,7 +683,7 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate() {
   global_template->Set(String::New("lol_is_enabled"), False());
 #endif

-#ifndef V8_SHARED
+#if !defined(V8_SHARED) && !defined(_WIN32) && !defined(_WIN64)
   Handle<ObjectTemplate> os_templ = ObjectTemplate::New();
   AddOSMethods(os_templ);
   global_template->Set(String::New("os"), os_templ);
Index: test/mjsunit/d8-os.js
diff --git a/test/mjsunit/d8-os.js b/test/mjsunit/d8-os.js
index fd6fb774ea77075d73111d2b707a456be0a19acf..5640326856b9a11562078db3cd80f92203a4a988 100644
--- a/test/mjsunit/d8-os.js
+++ b/test/mjsunit/d8-os.js
@@ -30,7 +30,7 @@
 // implemented on Windows, and even if it were then many of the things
 // 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) {
@@ -64,7 +64,7 @@ if (this.os && os.system) {
   os.chdir(TEST_DIR);
   try {
     // Check the chdir worked.
-    os.system('ls', ['../' + TEST_DIR]);
+    os.system('ls', [TEST_DIR]);
     // Simple create dir.
     os.mkdirp("dir");
     // Create dir in dir.
@@ -144,7 +144,6 @@ if (this.os && os.system) {
       //}
     }
   } finally {
-    os.chdir("..");
     os.system("rm", ["-r", TEST_DIR]);
   }



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to