Revision: 12636
Author: [email protected]
Date: Mon Oct 1 02:41:18 2012
Log: Fix cctests using Sockets to be able to run in parallel
BUG=v8:945
Review URL: https://codereview.chromium.org/11015008
http://code.google.com/p/v8/source/detail?r=12636
Modified:
/branches/bleeding_edge/test/cctest/cctest.h
/branches/bleeding_edge/test/cctest/cctest.status
/branches/bleeding_edge/test/cctest/test-debug.cc
/branches/bleeding_edge/test/cctest/test-sockets.cc
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.h Fri Sep 21 01:09:34 2012
+++ /branches/bleeding_edge/test/cctest/cctest.h Mon Oct 1 02:41:18 2012
@@ -212,6 +212,7 @@
static inline v8::Local<v8::Value> CompileRun(const char* source) {
return v8::Script::Compile(v8::String::New(source))->Run();
}
+
// Helper function that compiles and runs the source with given origin.
static inline v8::Local<v8::Value> CompileRunWithOrigin(const char* source,
@@ -223,6 +224,13 @@
v8::Integer::New(column_number));
return v8::Script::Compile(v8::String::New(source), &origin)->Run();
}
+
+
+// Pick a slightly different port to allow tests to be run in parallel.
+static inline int FlagDependentPortOffset() {
+ return ::v8::internal::FLAG_crankshaft == false ? 100 :
+ ::v8::internal::FLAG_always_opt ? 200 : 0;
+}
#endif // ifndef CCTEST_H_
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.status Mon Sep 10 02:24:17
2012
+++ /branches/bleeding_edge/test/cctest/cctest.status Mon Oct 1 02:41:18
2012
@@ -68,11 +68,6 @@
# BUG(355): Test crashes on ARM.
test-log/ProfLazyMode: SKIP
-# BUG(945): Tests using Socket cannot be run in parallel.
-test-debug/DebuggerAgent: SKIP
-test-debug/DebuggerAgentProtocolOverflowHeader: SKIP
-test-sockets/Socket: SKIP
-
# BUG(1075): Unresolved crashes.
test-serialize/Deserialize: SKIP
test-serialize/DeserializeFromSecondSerializationAndRunScript2: SKIP
@@ -89,8 +84,3 @@
# platform-tls.h does not contain an ANDROID-related header.
test-platform-tls/FastTLS: SKIP
-
-# BUG(945): Tests using Socket cannot be run in parallel.
-test-debug/DebuggerAgent: SKIP
-test-debug/DebuggerAgentProtocolOverflowHeader: SKIP
-test-sockets/Socket: SKIP
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Mon Sep 10 02:24:17
2012
+++ /branches/bleeding_edge/test/cctest/test-debug.cc Mon Oct 1 02:41:18
2012
@@ -5833,9 +5833,9 @@
i::Debugger* debugger = i::Isolate::Current()->debugger();
// Make sure these ports is not used by other tests to allow tests to
run in
// parallel.
- const int kPort1 = 5858;
- const int kPort2 = 5857;
- const int kPort3 = 5856;
+ const int kPort1 = 5858 + FlagDependentPortOffset();
+ const int kPort2 = 5857 + FlagDependentPortOffset();
+ const int kPort3 = 5856 + FlagDependentPortOffset();
// Make a string with the port2 number.
const int kPortBufferLen = 6;
@@ -5934,7 +5934,7 @@
TEST(DebuggerAgentProtocolOverflowHeader) {
// Make sure this port is not used by other tests to allow tests to run
in
// parallel.
- const int kPort = 5860;
+ const int kPort = 5860 + FlagDependentPortOffset();
static const char* kLocalhost = "localhost";
// Make a string with the port number.
=======================================
--- /branches/bleeding_edge/test/cctest/test-sockets.cc Fri Jan 13 05:09:52
2012
+++ /branches/bleeding_edge/test/cctest/test-sockets.cc Mon Oct 1 02:41:18
2012
@@ -124,7 +124,7 @@
TEST(Socket) {
// Make sure this port is not used by other tests to allow tests to run
in
// parallel.
- static const int kPort = 5859;
+ static const int kPort = 5859 + FlagDependentPortOffset();
bool ok;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev