summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucie Gérard <[email protected]>2025-01-06 11:46:11 +0100
committerLucie Gérard <[email protected]>2025-02-03 18:07:55 +0100
commitfcf0450dd2f783e4afbb929ba40fcc8edf1c7d71 (patch)
tree3b73fa755e6922a82909279a4d6ffbbbe8236d24
parent1da2c27b167ff8ed18b3581ffc7cd7f7322f8490 (diff)
Adapt file name path for Windows6.8.3
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: Alexey Edelev <[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;
}