Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 2b095bb

Browse files
author
Julien Gilli
committed
deps: add test for V8 version in profiler's log
431eb17 had integrated the addition of V8's version in V8's profiler log files, without backporting the test that was included in the original change (https://codereview.chromium.org/806143002). This commit backports this test. The newly added test was tested with #9208.
1 parent a6bdd8f commit 2b095bb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

deps/v8/test/cctest/test-log.cc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "src/natives.h"
4343
#include "src/utils.h"
4444
#include "src/v8threads.h"
45+
#include "src/version.h"
4546
#include "src/vm-state-inl.h"
4647
#include "test/cctest/cctest.h"
4748

@@ -493,3 +494,17 @@ TEST(EquivalenceOfLoggingAndTraversal) {
493494
CHECK(false);
494495
}
495496
}
497+
498+
TEST(LogVersion) {
499+
ScopedLoggerInitializer initialize_logger;
500+
bool exists = false;
501+
i::Vector<const char> log(
502+
i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
503+
CHECK(exists);
504+
i::EmbeddedVector<char, 100> ref_data;
505+
i::SNPrintF(ref_data, "v8-version,%d,%d,%d,%d,%d", i::Version::GetMajor(),
506+
i::Version::GetMinor(), i::Version::GetBuild(),
507+
i::Version::GetPatch(), i::Version::IsCandidate());
508+
CHECK_NE(NULL, StrNStr(log.start(), ref_data.start(), log.length()));
509+
log.Dispose();
510+
}

0 commit comments

Comments
 (0)