Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: test/cctest/cctest.h

Issue 11015008: Fix cctests using Sockets to be able to run in parallel (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index 4e8b7324d46639420b193eec8cae48db282b579f..f3961a4adc5a4752234b58891e2f25eaa15c89c6 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -213,6 +213,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,
const char* origin_url,
@@ -225,4 +226,11 @@ static inline v8::Local<v8::Value> CompileRunWithOrigin(const char* source,
}
+// 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_
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698