4
1
mirror of https://github.com/QuasarApp/CQtDeployer.git synced 2025-05-08 07:29:36 +00:00

ref "tests passed"

This commit is contained in:
Andrei Yankovich 2021-08-31 10:50:03 +03:00
parent ad021e251a
commit 6feb83b077
6 changed files with 105 additions and 4 deletions
Deploy/Distributions
UnitTests
testRes/QIFCustomTemplate
customRes.qrccustomconfig.xml
custompackages/org.qtproject.ifw.example.stylesheet/meta
tst_deploytest.cpp

@ -72,13 +72,20 @@ QList<SystemCommandData> QIF::runCmd() {
cmd.arguments = QStringList{
"-c",
location + "/config/config.xml",
QuasarAppUtils::Params::getArg("qifConfig", location + "/config/config.xml"),
"-p",
location + "/packages/",
"-v",
installerFile()
QuasarAppUtils::Params::getArg("qifPackages", location + "/packages/"),
"-v"
};
QString resources = QuasarAppUtils::Params::getArg("qifResources");
if (resources.size()) {
cmd.arguments.push_back("-r");
cmd.arguments.push_back(resources);
}
cmd.arguments.push_back(installerFile());
return {cmd};
}

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>customconfig.xml</file>
</qresource>
</RCC>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>Stylesheet Example</Name>
<Version>1.0.0</Version>
<Title>Stylesheet Example</Title>
<Publisher>Qt-Project</Publisher>
<StartMenuDir>Qt IFW Examples</StartMenuDir>
<TargetDir>@HomeDir@/IfwExamples/stylesheet</TargetDir>
<WizardStyle>Classic</WizardStyle>
<TitleColor>#FFFFFF</TitleColor>
</Installer>

@ -0,0 +1,39 @@
/**************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
** $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 http://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 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
**
** $QT_END_LICENSE$
**
**************************************************************************/
function Component()
{
// constructor
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
}

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>Dummy</DisplayName>
<ReleaseDate>2015-09-09</ReleaseDate>
<Version>1.0.1</Version>
<Default>true</Default>
<Script>installscript.qs</Script>
</Package>

@ -190,6 +190,8 @@ private slots:
// note: this test checking in manual mode only.
void testInstallDirsOptions();
void testQIFResources();
void customTest();
};
@ -1575,6 +1577,35 @@ void deploytest::testInstallDirsOptions() {
#endif
}
void deploytest::testQIFResources() {
TestUtils utils;
#ifdef Q_OS_UNIX
QString bin = {TestBinDir + "TestOnlyC"};
auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.run"},
{DISTRO_DIR + "/InstallerTestOnlyC.run.md5"}});
#else
QString bin = {TestBinDir + "TestOnlyC.exe"};
auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.exe"},
{DISTRO_DIR + "/InstallerTestOnlyC.exe.md5"}});
#endif
auto templateDir = TestBinDir + "/../../UnitTests/testRes/QIFCustomTemplate";
runTestParams({
"-bin", bin,
"clear",
"qif",
"-qifConfig", templateDir + "/customconfig.xml",
"-qifPackages", templateDir + "/custompackages",
"-qifResources", templateDir + "customRes.qrc"
}, &result
);
}
void deploytest::customTest() {
//runTestParams({"-confFile", "",
// "qifFromSystem"});