4
1
mirror of https://github.com/QuasarApp/CQtDeployer.git synced 2025-05-02 12:39:35 +00:00

added test for binDir flag

This commit is contained in:
Andrei Yankovich 2019-09-12 10:23:49 +03:00
parent fd1cc06e9f
commit 32cb206a43
3 changed files with 21 additions and 4 deletions

@ -301,7 +301,7 @@ bool CQT::setBinDir(const QString &dir, bool recursive) {
auto sufix = file.completeSuffix();
if (!((!recursive && sufix.isEmpty()) || sufix.contains("dll", Qt::CaseInsensitive) ||
if (!((!recursive) || sufix.isEmpty() || sufix.contains("dll", Qt::CaseInsensitive) ||
sufix.contains("so", Qt::CaseInsensitive) || sufix.contains("exe", Qt::CaseInsensitive))) {
continue;
}

@ -19,7 +19,7 @@ Key differences of this program:
| Option | Descriptiion |
|-----------------------------|-----------------------------------------------------------------|
| -bin [list, params] | Deployable file or folder. For example -bin ~/my/project/bin/,~/my/project/bin.exe|
| -binDir [params] | A folder which includes deployable files (recursive search). WARNING: this flag supports 'so', 'dll' and 'exe' files only. Use '-bin' flag if you want to deploy linux binary files |
| -binDir [params] | A folder which includes deployable files (recursive search). |
| -confFile [params] | The path to the json file with all deployment configurations. Using this file, you can add the necessary options, thereby simplifying the command invocation in the console. However, the parameters in Kansol have a higher priority than in the file. |
| -qmlDir [params] | Qml data dir. For example -qmlDir ~/my/project/qml |
| -qmake [params] | Qmake path. For example |
@ -92,7 +92,7 @@ Console QtDeployer является консольной реализацией
|-----------------------------|-----------------------------------------------------------|
| help / h | Показывает справку |
| -bin [list, params] | Развертываемый файл или папка. пример -bin ~/my/project/bin/,~/my/project/bin.exe|
| -binDir [params] | Папка с развертываемыми файлами (с рекурсивным поиском). ВНИМАНИЕ! Этот флаг поддерживает только файлы 'so', 'dll' и 'exe'. Если вы хотите развернуть бинарный файл Linux, используйте флаг '-bin' |
| -binDir [params] | Папка с развертываемыми файлами (с рекурсивным поиском). |
| -confFile [params] | Путь к файлу json со всеми конфигурациями развертывания. С помощью этого файла можно добавить нужные опции, тем самым упрастить вызов комманды в консоле. Однако пораметры в кансоле имеют больший приоритет чем в файле. |
| -qmlDir [params] | Папка qml. пример -qmlDir ~/my/project/qml |
| -qmake [params] | Путь к qmake. пример |

@ -75,6 +75,7 @@ private slots:
void testHelp();
void testOverwrite();
void testBinDir();
void testMSVC();
@ -570,7 +571,7 @@ void deploytest::testOverwrite() {
{"./Distro/bin/TestOnlyC",
"./Distro/TestOnlyC.sh"});
runTestParams({"-bin", TestBinDir + "TestOnlyC", "clear", "noOverwrite"}, &comapareTree);
runTestParams({"-bin", TestBinDir + "TestOnlyC", "force-clear", "noOverwrite"}, &comapareTree);
QFile f("./Distro/bin/TestOnlyC");
@ -616,6 +617,22 @@ void deploytest::testOverwrite() {
}
void deploytest::testBinDir() {
TestUtils utils;
auto comapareTree = utils.createTree(
{"./Distro/bin/TestOnlyC",
"./Distro/bin/QtWidgetsProject",
"./Distro/bin/TestQMLWidgets",
"./Distro/TestOnlyC.sh",
"./Distro/QtWidgetsProject.sh",
"./Distro/TestQMLWidgets.sh"});
runTestParams({"-binDir", TestBinDir, "clear"}, &comapareTree);
}
//bool deploytest::mainTestOnlyC() {
//#ifdef WITH_ALL_TESTS
// int argc = 5;