More warnings in AbstractTest::CopyRecursively. Do copy files before all test
run. --HG-- branch : develop
This commit is contained in:
parent
439b1577f5
commit
c793f869e5
|
@ -140,6 +140,7 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg
|
||||||
targetDir.cdUp();
|
targetDir.cdUp();
|
||||||
if (not targetDir.mkdir(QFileInfo(tgtFilePath).fileName()))
|
if (not targetDir.mkdir(QFileInfo(tgtFilePath).fileName()))
|
||||||
{
|
{
|
||||||
|
QWARN("Can't create subdir./n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QDir sourceDir(srcFilePath);
|
QDir sourceDir(srcFilePath);
|
||||||
|
@ -154,10 +155,12 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (not QFile::copy(srcFilePath, tgtFilePath))
|
if (not QFile::copy(srcFilePath, tgtFilePath))
|
||||||
{
|
{
|
||||||
|
QWARN("Can't copy file./n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ TST_TapeCommandLine::TST_TapeCommandLine(QObject *parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TST_TapeCommandLine::init()
|
void TST_TapeCommandLine::initTestCase()
|
||||||
{
|
{
|
||||||
QDir tmpDir(tmpTestFolder);
|
QDir tmpDir(tmpTestFolder);
|
||||||
if (not tmpDir.removeRecursively())
|
if (not tmpDir.removeRecursively())
|
||||||
|
@ -141,7 +141,7 @@ void TST_TapeCommandLine::OpenMeasurements()
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TST_TapeCommandLine::cleanup()
|
void TST_TapeCommandLine::cleanupTestCase()
|
||||||
{
|
{
|
||||||
QDir tmpDir(tmpTestFolder);
|
QDir tmpDir(tmpTestFolder);
|
||||||
if (not tmpDir.removeRecursively())
|
if (not tmpDir.removeRecursively())
|
||||||
|
|
|
@ -38,10 +38,10 @@ public:
|
||||||
explicit TST_TapeCommandLine(QObject *parent = nullptr);
|
explicit TST_TapeCommandLine(QObject *parent = nullptr);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void init();
|
void initTestCase();
|
||||||
void OpenMeasurements_data() const;
|
void OpenMeasurements_data() const;
|
||||||
void OpenMeasurements();
|
void OpenMeasurements();
|
||||||
void cleanup();
|
void cleanupTestCase();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(TST_TapeCommandLine)
|
Q_DISABLE_COPY(TST_TapeCommandLine)
|
||||||
|
|
|
@ -41,7 +41,7 @@ TST_ValentinaCommandLine::TST_ValentinaCommandLine(QObject *parent)
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
void TST_ValentinaCommandLine::init()
|
void TST_ValentinaCommandLine::initTestCase()
|
||||||
{
|
{
|
||||||
{// Test files
|
{// Test files
|
||||||
QDir tmpDir(tmpTestFolder);
|
QDir tmpDir(tmpTestFolder);
|
||||||
|
@ -308,7 +308,7 @@ void TST_ValentinaCommandLine::TestOpenCollection()
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
void TST_ValentinaCommandLine::cleanup()
|
void TST_ValentinaCommandLine::cleanupTestCase()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
QDir tmpDir(tmpTestFolder);
|
QDir tmpDir(tmpTestFolder);
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
explicit TST_ValentinaCommandLine(QObject *parent = nullptr);
|
explicit TST_ValentinaCommandLine(QObject *parent = nullptr);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void init();
|
void initTestCase();
|
||||||
void OpenPatterns_data() const;
|
void OpenPatterns_data() const;
|
||||||
void OpenPatterns();
|
void OpenPatterns();
|
||||||
void ExportMode_data() const;
|
void ExportMode_data() const;
|
||||||
|
@ -47,7 +47,7 @@ private slots:
|
||||||
void TestMode();
|
void TestMode();
|
||||||
void TestOpenCollection_data() const;
|
void TestOpenCollection_data() const;
|
||||||
void TestOpenCollection();
|
void TestOpenCollection();
|
||||||
void cleanup();
|
void cleanupTestCase();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(TST_ValentinaCommandLine)
|
Q_DISABLE_COPY(TST_ValentinaCommandLine)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user