summaryrefslogtreecommitdiffstats
path: root/tests/prebuild
diff options
context:
space:
mode:
authorJani Heikkinen <jani.heikkinen@qt.io>2020-09-28 11:32:08 +0300
committerJani Heikkinen <jani.heikkinen@qt.io>2020-09-29 14:44:56 +0300
commit66d6030924e968dffd98ba88d1382e8b08cc521d (patch)
tree8f8cb6b90ff0cf6dac35586497bcba1ca2c7faea /tests/prebuild
parent31776af0ba02639fed37c6441b093977f13c8fd0 (diff)
Move license header templates from qtbase to qtqa
It is weird that license header templates are located under qtbase. Move header templates to qtqa, beside actual license header test. This change is for qtqa part; actual removal from qtbase will be done as follow-up change after this one is in. Pick-to: master Change-Id: If48aeecf8916630fa7e8d3517086f6a6b9cb9850 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/prebuild')
-rw-r--r--tests/prebuild/license/templates/header.BSD50
-rw-r--r--tests/prebuild/license/templates/header.COMM20
-rw-r--r--tests/prebuild/license/templates/header.FDL27
-rw-r--r--tests/prebuild/license/templates/header.GPL29
-rw-r--r--tests/prebuild/license/templates/header.GPL-EXCEPT28
-rw-r--r--tests/prebuild/license/templates/header.LGPL39
-rw-r--r--tests/prebuild/license/templates/header.LGPL-NOGPL237
-rw-r--r--tests/prebuild/license/templates/header.LGPL-ONLY22
-rw-r--r--tests/prebuild/license/templates/header.LGPL336
-rw-r--r--tests/prebuild/license/templates/header.LGPL3-COMM28
-rw-r--r--tests/prebuild/license/templates/header.MIT28
-rwxr-xr-xtests/prebuild/license/tst_licenses.pl37
12 files changed, 352 insertions, 29 deletions
diff --git a/tests/prebuild/license/templates/header.BSD b/tests/prebuild/license/templates/header.BSD
new file mode 100644
index 00000000..ca6777ac
--- /dev/null
+++ b/tests/prebuild/license/templates/header.BSD
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.COMM b/tests/prebuild/license/templates/header.COMM
new file mode 100644
index 00000000..73512a57
--- /dev/null
+++ b/tests/prebuild/license/templates/header.COMM
@@ -0,0 +1,20 @@
+/******************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the <Fill> module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
diff --git a/tests/prebuild/license/templates/header.FDL b/tests/prebuild/license/templates/header.FDL
new file mode 100644
index 00000000..ea0a503f
--- /dev/null
+++ b/tests/prebuild/license/templates/header.FDL
@@ -0,0 +1,27 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.GPL b/tests/prebuild/license/templates/header.GPL
new file mode 100644
index 00000000..62651cb1
--- /dev/null
+++ b/tests/prebuild/license/templates/header.GPL
@@ -0,0 +1,29 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.GPL-EXCEPT b/tests/prebuild/license/templates/header.GPL-EXCEPT
new file mode 100644
index 00000000..4a6bb4cc
--- /dev/null
+++ b/tests/prebuild/license/templates/header.GPL-EXCEPT
@@ -0,0 +1,28 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.LGPL b/tests/prebuild/license/templates/header.LGPL
new file mode 100644
index 00000000..3ca3e49a
--- /dev/null
+++ b/tests/prebuild/license/templates/header.LGPL
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.LGPL-NOGPL2 b/tests/prebuild/license/templates/header.LGPL-NOGPL2
new file mode 100644
index 00000000..d7d0b9f6
--- /dev/null
+++ b/tests/prebuild/license/templates/header.LGPL-NOGPL2
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL-NOGPL2$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.LGPL-ONLY b/tests/prebuild/license/templates/header.LGPL-ONLY
new file mode 100644
index 00000000..70cf1675
--- /dev/null
+++ b/tests/prebuild/license/templates/header.LGPL-ONLY
@@ -0,0 +1,22 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL-ONLY$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you have questions regarding the use of this file, please contact
+** us via http://www.qt.io/contact-us/.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/prebuild/license/templates/header.LGPL3 b/tests/prebuild/license/templates/header.LGPL3
new file mode 100644
index 00000000..0940ad9e
--- /dev/null
+++ b/tests/prebuild/license/templates/header.LGPL3
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.LGPL3-COMM b/tests/prebuild/license/templates/header.LGPL3-COMM
new file mode 100644
index 00000000..409a09b6
--- /dev/null
+++ b/tests/prebuild/license/templates/header.LGPL3-COMM
@@ -0,0 +1,28 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3-COMM$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/tests/prebuild/license/templates/header.MIT b/tests/prebuild/license/templates/header.MIT
new file mode 100644
index 00000000..df431dda
--- /dev/null
+++ b/tests/prebuild/license/templates/header.MIT
@@ -0,0 +1,28 @@
+/****************************************************************************
+**
+** Copyright (C) YYYY Intel Corporation.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:MIT$
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and associated documentation files (the "Software"), to deal
+** in the Software without restriction, including without limitation the rights
+** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+** copies of the Software, and to permit persons to whom the Software is
+** furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+** THE SOFTWARE.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/prebuild/license/tst_licenses.pl b/tests/prebuild/license/tst_licenses.pl
index a23e371a..e7ce9d14 100755
--- a/tests/prebuild/license/tst_licenses.pl
+++ b/tests/prebuild/license/tst_licenses.pl
@@ -631,40 +631,17 @@ sub run
}
#
- # Pase 2: Read the reference license texts
+ # Phase 2: Read the reference license texts
#
-
- # Check that qtbase is a peer directory of QT_MODULE_TO_TEST
- my @qtbase_paths = (
- catfile( $QT_MODULE_TO_TEST, '..', 'qtbase' ), # qt5 submodule case
- catfile( $QT_MODULE_TO_TEST, 'qtbase' ), # qt5 case
- catfile( $QT_MODULE_TO_TEST, '../..', 'qt/qtbase' ), # any other module (qt-labs/someproject)
- );
-
- @moduleOptionalFiles = readRegularExpressionsFromFile(catfile($QT_MODULE_TO_TEST, ".qt-license-check.optional"));
- @moduleExcludedFiles = readRegularExpressionsFromFile(catfile($QT_MODULE_TO_TEST, ".qt-license-check.exclude"));
-
- my $qtbase_path = first { -d $_ } @qtbase_paths;
- if (! $qtbase_path) {
- my $output = `qmake -query QT_INSTALL_PREFIX/src`;
- chomp($output);
- $qtbase_path = $output if -d $output;
- }
- if (! $qtbase_path) {
- fail("Cannot find qtbase module, looked at: @qtbase_paths");
- return;
- }
-
- # Treat all header.* files in the root of qtbase as reference license text
- foreach (glob "$qtbase_path/header.*") {
+ # Load reference license headers from qtqa/tests/prebuild/license/templates/
+ my $current_dir = dirname(__FILE__);
+ foreach (glob "$current_dir/templates/header.*") {
loadLicense($_) || return;
}
# Also load all header.* files in the module's root, in case the module has special requirements
- if (abs_path($qtbase_path) ne abs_path($QT_MODULE_TO_TEST)) {
- foreach (glob "$QT_MODULE_TO_TEST/header.*") {
- loadLicense($_) || return;
- }
+ foreach (glob "$QT_MODULE_TO_TEST/header.*") {
+ loadLicense($_) || return;
}
my $numLicenses = keys %licenseTexts;
@@ -676,6 +653,8 @@ sub run
#
# Phase 3: Decide which files we are going to scan.
#
+ @moduleOptionalFiles = readRegularExpressionsFromFile(catfile($QT_MODULE_TO_TEST, ".qt-license-check.optional"));
+ @moduleExcludedFiles = readRegularExpressionsFromFile(catfile($QT_MODULE_TO_TEST, ".qt-license-check.exclude"));
my @filesToScan;
if (!$optForceFind && -d "$QT_MODULE_TO_TEST/.git") {