MCPcopy Index your code
hub / github.com/nodejs/node / testRollMerge

Method testRollMerge

deps/v8/tools/release/test_scripts.py:541–675  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

539 self.assertEquals("abc123", state["candidate"])
540
541 def testRollMerge(self):
542 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile()
543 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
544 self.WriteFakeVersionFile(build=5)
545 os.environ["EDITOR"] = "vi"
546 extra_patch = self.MakeEmptyTempFile()
547
548 def VerifyPatch(patch):
549 return lambda: self.assertEquals(patch,
550 FileToText(TEST_CONFIG["TEMPORARY_PATCH_FILE"]))
551
552 msg = """Version 3.22.5.1 (cherry-pick)
553
554Merged ab12345
555Merged ab23456
556Merged ab34567
557Merged ab45678
558Merged ab56789
559
560Title4
561
562Title2
563
564Title3
565
566Title1
567
568Revert "Something"
569
570BUG=123,234,345,456,567,v8:123
571"""
572
573 def VerifyLand():
574 commit = FileToText(TEST_CONFIG["COMMITMSG_FILE"])
575 self.assertEquals(msg, commit)
576 version = FileToText(
577 os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE))
578 self.assertTrue(re.search(r"#define V8_MINOR_VERSION\s+22", version))
579 self.assertTrue(re.search(r"#define V8_BUILD_NUMBER\s+5", version))
580 self.assertTrue(re.search(r"#define V8_PATCH_LEVEL\s+1", version))
581 self.assertTrue(
582 re.search(r"#define V8_IS_CANDIDATE_VERSION\s+0", version))
583
584 self.Expect([
585 Cmd("git status -s -uno", ""),
586 Cmd("git checkout -f origin/main", ""),
587 Cmd("git fetch", ""),
588 Cmd("git branch", " branch1\n* branch2\n"),
589 Cmd("git new-branch %s --upstream refs/remotes/origin/candidates" %
590 TEST_CONFIG["BRANCHNAME"], ""),
591 Cmd(("git log --format=%H --grep=\"Port ab12345\" "
592 "--reverse origin/main"),
593 "ab45678\nab23456"),
594 Cmd("git log -1 --format=%s ab45678", "Title1"),
595 Cmd("git log -1 --format=%s ab23456", "Title2"),
596 Cmd(("git log --format=%H --grep=\"Port ab23456\" "
597 "--reverse origin/main"),
598 ""),

Callers

nothing calls this directly

Calls 9

MakeEmptyTempFileMethod · 0.95
WriteFakeVersionFileMethod · 0.95
ExpectMethod · 0.95
RollMergeClass · 0.90
TextToFileFunction · 0.85
CmdFunction · 0.85
RLFunction · 0.70
joinMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected