From 1be1b31e1afb74135a4fc9721fc86b6d867e13bc Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 23 Mar 2022 10:00:54 -0500 Subject: [PATCH] remove git patching --- .../downstream_testing/downstream_runner.py | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/testing/downstream_testing/downstream_runner.py b/testing/downstream_testing/downstream_runner.py index 625b33d34..ee1129679 100644 --- a/testing/downstream_testing/downstream_runner.py +++ b/testing/downstream_testing/downstream_runner.py @@ -106,40 +106,6 @@ class DownstreamRunner: return self._yaml_tree - def apply_git_patches(self): - """ Apply any applicable git patches to the repo.""" - if self.dry_run: - logger.info("Skipping all git patches (dry-run).") - return - - working_dir = os.getcwd() - patches_dir = os.path.join(working_dir, "testing", "downstream_testing", "patches") - repo_dir = os.path.join(working_dir, self.repo) - - for patch in os.listdir(patches_dir): - if patch.startswith(self.repo) and patch.endswith(".patch"): - patch_full_path = os.path.join(patches_dir, patch) - logger.info("Applying patch: %s", patch) - if not self.dry_run: - if not os.getcwd() == repo_dir: - os.chdir(repo_dir) - try: - git.config("user.email", "noreply@noreply.no") - git.config("user.name", "pytest-dev") - logger.info("%s", git.am(patch_full_path)) - except sh.ErrorReturnCode as err: - logger.info( - "Failed to apply '%s' to '%s': %s", - patch, - self.repo, - str(err.stderr) - ) - else: - logger.info("Skipping patch: %s", patch) - - if not os.getcwd() == working_dir: - os.chdir(working_dir) - def inject_pytest_dep(self): """ Ensure pytest is a dependency in tox.ini to allow us to use the 'local' version of pytest. @@ -258,7 +224,6 @@ class DownstreamRunner: return run def run(self): - self.apply_git_patches() self.inject_pytest_dep() run_steps = self.build_run() os.chdir(self.repo)