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

Unified Diff: test/cctest/test-log.cc

Issue 806143002: Log V8 version in profiler log file (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « src/log-utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-log.cc
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index 6fe3a561b4d68ebd7ad3ddebc8d26fe625191206..eee3e1341a8a55c59220813d139ddf86daafaac7 100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -42,6 +42,7 @@
#include "src/natives.h"
#include "src/utils.h"
#include "src/v8threads.h"
+#include "src/version.h"
#include "src/vm-state-inl.h"
#include "test/cctest/cctest.h"
@@ -507,3 +508,23 @@ TEST(EquivalenceOfLoggingAndTraversal) {
}
isolate->Dispose();
}
+
+
+TEST(LogVersion) {
+ v8::Isolate* isolate;
+ {
+ ScopedLoggerInitializer initialize_logger;
+ isolate = initialize_logger.isolate();
+ bool exists = false;
+ i::Vector<const char> log(
+ i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
+ CHECK(exists);
+ i::EmbeddedVector<char, 100> ref_data;
+ i::SNPrintF(ref_data, "v8-version,%d,%d,%d,%d,%d", i::Version::GetMajor(),
+ i::Version::GetMinor(), i::Version::GetBuild(),
+ i::Version::GetPatch(), i::Version::IsCandidate());
+ CHECK_NE(NULL, StrNStr(log.start(), ref_data.start(), log.length()));
+ log.Dispose();
+ }
+ isolate->Dispose();
+}
« no previous file with comments | « src/log-utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698