Skip to content

Commit

Permalink
Refactor scripts to use config.py instead of config.pl
Browse files Browse the repository at this point in the history
This commit refactors Windows testing scripts to use config.py instead
of config.pl because config.pl is being removed from the Mbed TLS
repository.

Signed-off-by: Harry Ramsey <[email protected]>
  • Loading branch information
Harry-Ramsey committed Oct 8, 2024
1 parent 12d8753 commit 8315fe3
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.exe"

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 8315fe3

Please sign in to comment.