Skip to content

Commit f9af8e2

Browse files
committed
Detect support for shipped VS solution files
This separates their detection from shipped Makefiles. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
1 parent 5342e0f commit f9af8e2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/org/mbed/tls/jenkins/BranchInfo.groovy

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ class BranchInfo {
5454
/** All of the Visual Studio versions supported by this branch */
5555
public List<String> supported_vs_versions
5656

57-
/** Whether this branch supports builds using legacy, non-CMake build systems */
58-
boolean supports_legacy_build_systems
57+
/** Whether this branch has shipped Makefiles */
58+
public boolean has_shipped_makefiles
59+
60+
/** Whether this branch has shipped Visual Studio solution files */
61+
public boolean has_shipped_vs_solutions
5962

6063
/** Keep track of builds that fail */
6164
final Set<String> failed_builds
@@ -73,7 +76,8 @@ class BranchInfo {
7376
this.python_requirements_override_content = ''
7477
this.python_requirements_override_file = ''
7578
this.supported_vs_versions = []
76-
this.supports_legacy_build_systems = false
79+
this.has_shipped_makefiles = false
80+
this.has_shipped_vs_solutions = false
7781
this.failed_builds = []
7882
this.outcome_stashes = []
7983
this.coverage_details = 'Code coverage job did not run'

vars/common.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ List<BranchInfo> get_branch_information(Collection<String> tls_branches, Collect
277277
info.supported_vs_versions = ['2017']
278278

279279
// Detect support for legacy build systems (< Mbed TLS 4.0)
280-
info.supports_legacy_build_systems = fileExists('Makefile')
280+
info.has_shipped_makefiles = fileExists('Makefile')
281+
info.has_shipped_vs_solutions = fileExists('visualc/VS2017')
281282
}
282283

283284
String platform = linux_platforms[0]

vars/gen_jobs.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def gen_windows_testing_job(BranchInfo info, String toolchain) {
321321
def prefix = "${info.prefix}Windows-${toolchain}"
322322
def build_configs, arches, build_systems, retargeted
323323
if (toolchain == 'mingw') {
324-
if (!info.supports_legacy_build_systems) {
324+
if (!info.has_shipped_makefiles) {
325325
// The mingw toolchain uses the legacy shipped Makefiles
326326
return [:]
327327
}
@@ -332,7 +332,7 @@ def gen_windows_testing_job(BranchInfo info, String toolchain) {
332332
} else {
333333
build_configs = ['Release', 'Debug']
334334
arches = ['Win32', 'x64']
335-
build_systems = info.supports_legacy_build_systems ? ['shipped', 'cmake'] : ['cmake']
335+
build_systems = info.has_shipped_vs_solutions ? ['shipped', 'cmake'] : ['cmake']
336336
retargeted = [false, true]
337337
}
338338

0 commit comments

Comments
 (0)