summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucie GĂ©rard <[email protected]>2025-01-06 11:46:11 +0100
committerQt Cherry-pick Bot <[email protected]>2025-01-07 14:00:30 +0000
commit781d0547ed1026b06b2f34a2d8178123e7f75093 (patch)
treec03a451ede558ce1d71b6ea3379b63fbac07ecea
parentf1e7687d7b665a394d8d6e6b3acf9fb22c74a465 (diff)
Adapt file name path for Windows6.9.0
When testing the source SBOM using tst_license.pl the file name is picked from the source SBOM file. For windows, the file name has \ which does not correspond to what is found in the licenseRule.json. The file name is rewritten with /. Task-number: QTBUG-131434 Change-Id: Ib88a626927c6ccfb639d43bcd9219d8b88fde0bf Reviewed-by: Joerg Bornemann <[email protected]> (cherry picked from commit 4e4f50a52c58f2eec20c7bd0d321d9f547fb50c1) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rwxr-xr-xtests/prebuild/license/tst_licenses.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/prebuild/license/tst_licenses.pl b/tests/prebuild/license/tst_licenses.pl
index 307593f2..0e5a8cdd 100755
--- a/tests/prebuild/license/tst_licenses.pl
+++ b/tests/prebuild/license/tst_licenses.pl
@@ -715,7 +715,7 @@ sub readReuseSourceSbom
if ( $row =~ s,^FileName:\s+./,,) {
#skipping 3rdparty directories for the moment
- if ( $row =~ m,/3rdparty/,) {
+ if ( $row =~ m,/3rdparty/, or $row =~ m,\\3rdparty\\,) {
$file = "";
} else {
$file = $row;
@@ -743,6 +743,7 @@ sub checkLicenseUsageInSourceSbom
foreach (sort keys %filesLicensingInSourceSbom) {
my $shortfilename = $_;
my $expression = $filesLicensingInSourceSbom{$shortfilename};
+ $shortfilename =~ s,\\,/,g;
if (!checkLicenseUsage($expression, $shortfilename, $checkingWithoutLogic)) {
$numErrorSbom +=1;
}