Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force PR tests to use a merge commit for testing with --no-ff #3

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/framework/pr_tools/PullRequestLinuxDriverMerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ def merge_branch(source_url, target_branch, sourceSHA):

if sha_exists_as_branch_on_remote:
print_wrapper("REMARK: Detected ref as a remote branch, will merge as such")
check_call_wrapper(['git', 'merge', '--no-edit', "source_remote/" + sourceSHA])
check_call_wrapper(['git', 'merge', '--no-ff', '--no-edit', "source_remote/" + sourceSHA])
else:
check_call_wrapper(['git', 'merge', '--no-edit', sourceSHA])
check_call_wrapper(['git', 'merge', '--no-ff', '--no-edit', sourceSHA])

return 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def test_mergeBranch_without_source_remote(self):
mock.call(['git', 'fetch', 'origin', 'fake_develop']),
mock.call(['git', 'reset', '--hard', 'HEAD']),
mock.call(['git', 'checkout', '-B', 'fake_develop', 'origin/fake_develop']),
mock.call(['git', 'merge', '--no-edit', 'df324ae']),
mock.call(['git', 'merge', '--no-ff', '--no-edit', 'df324ae']),
])
return

Expand Down Expand Up @@ -199,7 +199,7 @@ def test_mergeBranch_with_source_remote(self, m_check_call):
mock.call(['git', 'fetch', 'origin', 'fake_develop']),
mock.call(['git', 'reset', '--hard', 'HEAD']),
mock.call(['git', 'checkout', '-B', 'fake_develop', 'origin/fake_develop']),
mock.call(['git', 'merge', '--no-edit', 'df324ae']),
mock.call(['git', 'merge', '--no-ff', '--no-edit', 'df324ae']),
])
self.assertIn("git remote exists, removing it", m_stdout.getvalue())
return
Expand Down Expand Up @@ -229,7 +229,7 @@ def test_mergeBranch_ref_is_remote_branch(self, m_check_call):
mock.call(['git', 'fetch', 'origin', 'fake_develop']),
mock.call(['git', 'reset', '--hard', 'HEAD']),
mock.call(['git', 'checkout', '-B', 'fake_develop', 'origin/fake_develop']),
mock.call(['git', 'merge', '--no-edit', 'source_remote/some_ref']),
mock.call(['git', 'merge', '--no-ff', '--no-edit', 'source_remote/some_ref']),
])
self.assertIn("git remote exists, removing it", m_stdout.getvalue())
return
Expand Down
Loading