Commit 9afcf2f7 authored by Robert Griebl's avatar Robert Griebl
Browse files

Also load license header from the module's root directory.


This makes it easy to check modules that use license headers different
from the ones in qtbase.

Change-Id: I8ffe7bca235c1f8a3534e0de50ba36c61d2d1404
Reviewed-by: default avatarSimon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: default avatarTony Sarajärvi <tony.sarajarvi@theqtcompany.com>
No related merge requests found
Showing with 9 additions and 1 deletion
......@@ -69,7 +69,6 @@ my @excludedModules = qw{
qtwebengine
3rdparty
qtqa
qtapplicationmanager
};
# If you add to the following lists of regexes, please
......@@ -279,6 +278,10 @@ sub loadLicense {
fail("$licenseFile has no QT_END_LICENSE marker");
return 0;
}
if (exists($licenseTexts{$licenseType})) {
fail("$licenseFile re-defines a license of type $licenseType");
return 0;
}
$licenseTexts{$licenseType} = \@licenseText;
return 1;
......@@ -520,6 +523,11 @@ sub run
loadLicense($_) || return;
}
# Also load all header.* files in the module's root, in case the module has special requirements
foreach (glob "$QT_MODULE_TO_TEST/header.*") {
loadLicense($_) || return;
}
my $numLicenses = keys %licenseTexts;
if ($numLicenses == 0) {
fail("No reference licenses were found.");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment