Skip to content

Commit

Permalink
Merge pull request #178 from Harry-Ramsey/refactor-config-pl-config-p…
Browse files Browse the repository at this point in the history
…y-main

Refactor scripts to use config.py instead of config.pl
  • Loading branch information
mpg authored Nov 25, 2024
2 parents 4bbc4f6 + 8e4283c commit 99a5a4f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/windows/windows_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ def __init__(self,
self.selftest_success_pattern = "\[ All tests (PASS|passed) \]"
self.test_suites_success_pattern = "100% tests passed, 0 tests failed"
self.mingw_success_pattern = "PASSED \(\d+ suites, \d+ tests run\)"
self.config_pl_location = os.path.join("scripts", "config.pl")
self.config_py_location = os.path.join("scripts", "config.py")
self.selftest_exe = "selftest.exe"
self.mingw_command = "mingw32-make"
self.git_command = "git"
self.perl_command = "perl"
self.python_command = "python"

def this_version_forbids_c99(self, path):
# If CMakeLists.txt contains -Wdeclaration-after-statement,
Expand Down Expand Up @@ -259,11 +259,11 @@ def set_config_on_code(self, git_worktree_path, logger):
"""Enables all config specified in config.pl, then disables config
based on the version being tested."""
logger.info("Enabling as much of {} as possible".format(
self.config_pl_location
self.config_py_location
))
try:
enable_output = subprocess.run(
[self.perl_command, self.config_pl_location, "full"],
[self.python_command, self.config_py_location, "full"],
cwd=git_worktree_path,
encoding=sys.stdout.encoding,
stdout=subprocess.PIPE,
Expand All @@ -273,7 +273,7 @@ def set_config_on_code(self, git_worktree_path, logger):
logger.info(enable_output.stdout)
for option in self.config_to_disable:
disable_output = subprocess.run(
[self.perl_command, self.config_pl_location,
[self.python_command, self.config_py_location,
"unset", option],
cwd=git_worktree_path,
encoding=sys.stdout.encoding,
Expand Down

0 comments on commit 99a5a4f

Please sign in to comment.