Skip to content

Conversation

bensze01
Copy link
Contributor

@bensze01 bensze01 commented Sep 11, 2025

Fixes Mbed-TLS/mbedtls#10144

This PR avoids a larger refactor of gen_windows_testing_job() to make reviewing easier.

I've also prepared a branch where this PR is rebased on-top of #218, and used this PR for the new-ci tests.

The development runs below detect that it supports the legacy build systems. This is indended, as the support is dropped in Mbed-TLS/mbedtls#10382, which depends on this PR.

CI runs:

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Disable windows test using the legacy build systems if they are not supported.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Copy link
Contributor

@minosgalanakis minosgalanakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

def prefix = "${info.prefix}Windows-${toolchain}"
def build_configs, arches, build_systems, retargeted
if (toolchain == 'mingw') {
assert info.supports_legacy_build_systems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to explicitly break the flow of execution? Or is that because we need to return something from gen_windows_testing_job and cannot easily fail early wihtout adding the job?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can just return an empty map, if you'd prefer that instead of asserting on a "disallowed" case.

Copy link
Contributor Author

@bensze01 bensze01 Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also remove the need for the conditionals in gen_windows_jobs()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea that could be easier to maintain

This allows us to only check whether we support legacy build systems / shipped build scripts in one place.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Use the "<<" operator (== Map.putAll()) instead of "+".

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
minosgalanakis
minosgalanakis previously approved these changes Sep 12, 2025
Copy link
Contributor

@minosgalanakis minosgalanakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ronald-cron-arm ronald-cron-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly good to me. There is one thing I would like to improve though.

info.supported_vs_versions = ['2017']

// Detect support for legacy build systems (< Mbed TLS 4.0)
info.supports_legacy_build_systems = fileExists('Makefile')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR we are removing the windows jobs that uses the makefile and MS Visual Studio files to build the library and the tests. Thus we need to remove the generation of MS Visual Studio files in mbedtls. This is done now in Mbed-TLS/mbedtls#10382. I think it would then be better to check here for the presence of the directory visualc/VS2017 directory to check if we run or not the jobs using the MS Visual Studio files.

This separates their detection from shipped Makefiles.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Copy link
Contributor

@minosgalanakis minosgalanakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ronald-cron-arm ronald-cron-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Before to merge it as 5342e0f affects more than just the Windows jobs we may want to run all tests. Wdyt?

@github-project-automation github-project-automation bot moved this from In Development to Has Approval in Roadmap pull requests (new board) Sep 16, 2025
@bensze01
Copy link
Contributor Author

5342e0f is a uniform change, and the windows test paths do touch code that is changed the same way as the non-windows parts, so I'm comfortable with merging this change without further non-windows testing.

@bensze01 bensze01 merged commit f0434b1 into main Sep 16, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from Has Approval to Done in Roadmap pull requests (new board) Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size-xs Estimated task size: extra small (a few hours at most)
Development

Successfully merging this pull request may close these issues.

Support for Visual Studio in TF-PSA-Crypto 1.x and Mbed TLS 4.x
3 participants