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

Method testMergeToBranch

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

Source from the content-addressed store, hash-verified

675 RollMerge(TEST_CONFIG, self).Run(args)
676
677 def testMergeToBranch(self):
678 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile()
679 TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
680 self.WriteFakeVersionFile(build=5)
681 os.environ["EDITOR"] = "vi"
682 extra_patch = self.MakeEmptyTempFile()
683
684
685 def VerifyPatch(patch):
686 return lambda: self.assertEquals(patch,
687 FileToText(TEST_CONFIG["TEMPORARY_PATCH_FILE"]))
688
689 info_msg = ("NOTE: This script will no longer automatically "
690 "update include/v8-version.h "
691 "and create a tag. This is done automatically by the autotag bot. "
692 "Please call the merge_to_branch.py with --help for more information.")
693
694 msg = """Merged: Squashed multiple commits.
695
696Merged: Title4
697Revision: ab12345
698
699Merged: Title2
700Revision: ab23456
701
702Merged: Title3
703Revision: ab34567
704
705Merged: Title1
706Revision: ab45678
707
708Merged: Revert \"Something\"
709Revision: ab56789
710
711BUG=123,234,345,456,567,v8:123
712"""
713
714 def VerifyLand():
715 commit = FileToText(TEST_CONFIG["COMMITMSG_FILE"])
716 self.assertEquals(msg, commit)
717
718 self.Expect([
719 Cmd("git status -s -uno", ""),
720 Cmd("git checkout -f origin/main", ""),
721 Cmd("git fetch", ""),
722 Cmd("git branch", " branch1\n* branch2\n"),
723 Cmd("git new-branch %s --upstream refs/remotes/origin/candidates" %
724 TEST_CONFIG["BRANCHNAME"], ""),
725 Cmd(("git log --format=%H --grep=\"^[Pp]ort ab12345\" "
726 "--reverse origin/main"),
727 "ab45678\nab23456"),
728 Cmd("git log -1 --format=%s ab45678", "Title1"),
729 Cmd("git log -1 --format=%s ab23456", "Title2"),
730 Cmd(("git log --format=%H --grep=\"^[Pp]ort ab23456\" "
731 "--reverse origin/main"),
732 ""),
733 Cmd(("git log --format=%H --grep=\"^[Pp]ort ab34567\" "
734 "--reverse origin/main"),

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected