[SCM] qbs packaging branch, experimental, updated. debian/1.4.1+dfsg-2-3-g57dc8c2
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Sat Jul 11 16:34:05 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qbs.git;a=commitdiff;h=57dc8c2
The following commit has been merged in the experimental branch:
commit 57dc8c2e42d68a91afd8fce495b6fad4676b0ed3
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Sat Jul 11 19:33:51 2015 +0300
Replace revert_tests_speedup.diff with proposed upstream version.
---
debian/changelog | 2 +
debian/patches/revert_tests_speedup.diff | 603 ++++++++++++++++++++++++++++++-
2 files changed, 590 insertions(+), 15 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a7cfa00..63e0d40 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ qbs (1.4.1+dfsg-3) UNRELEASED; urgency=medium
[ Dmitry Shachnev ]
* Backport upstream change to run testAssembly only on architectures
where it is supported (fix_assembly_test.diff).
+ * Replace revert_tests_speedup.diff with proposed upstream version
+ by Christian Kandeler.
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Thu, 09 Jul 2015 14:45:25 +0300
diff --git a/debian/patches/revert_tests_speedup.diff b/debian/patches/revert_tests_speedup.diff
index 6be05e3..6f7d54c 100644
--- a/debian/patches/revert_tests_speedup.diff
+++ b/debian/patches/revert_tests_speedup.diff
@@ -1,29 +1,602 @@
-Description: revert upstream commit that made tests less stable
- This one: http://code.qt.io/cgit/qt-labs/qbs.git/commit/?id=b7d70d48508e4645.
-Author: Dmitry Shachnev <mitya57 at debian.org>
-Forwarded: no
-Last-Update: 2015-07-08
+Description: take the file system into account when waiting for new timestamp
+Author: Christian Kandeler <christian.kandeler at theqtcompany.com>
+Last-Update: 2015-07-11
--- a/tests/auto/shared.h
+++ b/tests/auto/shared.h
-@@ -91,17 +91,10 @@
- inline void waitForNewTimestamp()
+@@ -35,13 +35,13 @@
+ #include <tools/settings.h>
+
+ #include <QCryptographicHash>
++#include <QDateTime>
+ #include <QDir>
+ #include <QFile>
+ #include <QFileInfo>
++#include <QTemporaryFile>
+ #include <QtTest>
+
+-#include <ctime>
+-
+ inline QString profileName() { return QLatin1String("qbs_autotests"); }
+ inline QString relativeBuildDir(const QString &pName = QString())
+ {
+@@ -88,19 +88,25 @@
+ + qbs::Internal::HostOsInfo::appendExecutableSuffix(productName);
+ }
+
+-inline void waitForNewTimestamp()
++inline void waitForNewTimestamp(const QString &testDir)
{
// Waits for the time that corresponds to the host file system's time stamp granularity.
-- if (qbs::Internal::HostOsInfo::isWindowsHost()) {
-+ if (qbs::Internal::HostOsInfo::isWindowsHost())
+ if (qbs::Internal::HostOsInfo::isWindowsHost()) {
QTest::qWait(1); // NTFS has 100 ns precision. Let's ignore exFAT.
-- } else {
+ } else {
- time_t oldTime;
- time_t newTime = std::time(0);
- do {
- oldTime = newTime;
-- QTest::qWait(50);
++ const QString nameTemplate = testDir + "/XXXXXX";
++ QTemporaryFile f1(nameTemplate);
++ if (!f1.open())
++ qFatal("Failed to open temp file");
++ const QDateTime initialTime = QFileInfo(f1).lastModified();
++ while (true) {
+ QTest::qWait(50);
- newTime = std::time(0);
- } while (oldTime == newTime);
-- }
-+ else
-+ QTest::qWait(1000);
++ QTemporaryFile f2(nameTemplate);
++ if (!f2.open())
++ qFatal("Failed to open temp file");
++ if (QFileInfo(f2).lastModified() > initialTime)
++ break;
++ }
+ }
}
- inline void touch(const QString &fn)
+--- a/tests/auto/api/tst_api.cpp
++++ b/tests/auto/api/tst_api.cpp
+@@ -49,6 +49,8 @@
+ #define VERIFY_NO_ERROR(errorInfo) \
+ QVERIFY2(!errorInfo.hasError(), qPrintable(errorInfo.toString()))
+
++#define WAIT_FOR_NEW_TIMESTAMP() waitForNewTimestamp(m_workingDataDir)
++
+ class LogSink: public qbs::ILogSink
+ {
+ public:
+@@ -154,7 +156,7 @@
+ QVERIFY2(!receiver.descriptions.contains("moc"), qPrintable(receiver.descriptions));
+ receiver.descriptions.clear();
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile cppFile("object.cpp");
+ QVERIFY2(cppFile.open(QIODevice::ReadWrite), qPrintable(cppFile.errorString()));
+ QByteArray contents = cppFile.readAll();
+@@ -184,7 +186,7 @@
+ receiver.output.clear();
+
+ // Add a file. qbs must schedule it for rule application on the next build.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ const qbs::SetupProjectParameters params = defaultSetupParameters(relProjectFilePath);
+ QFile projectFile(params.projectFilePath());
+ QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString()));
+@@ -202,7 +204,7 @@
+
+ // Remove the file again. qbs must unschedule the rule application again.
+ // Consequently, the linking step must fail as in the initial run.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ projectFile.resize(0);
+ projectFile.write(originalContent);
+ projectFile.flush();
+@@ -211,7 +213,7 @@
+ QVERIFY2(isAboutUndefinedSymbols(receiver.output), qPrintable((receiver.output)));
+
+ // Add the file again. qbs must schedule it for rule application on the next build.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ projectFile.resize(0);
+ projectFile.write(addedFileContent);
+ projectFile.close();
+@@ -263,7 +265,7 @@
+ QVERIFY2(QFile::remove(productFileName), qPrintable(productFileName));
+ }
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ qbs::BuildOptions options;
+ options.setForceTimestampCheck(true);
+ errorInfo = doBuildProject(projectSubDir + "/project.qbs", 0, 0, 0, options);
+@@ -739,7 +741,7 @@
+ qbs::ErrorInfo errorInfo = doBuildProject("change-dependent-lib/change-dependent-lib.qbs");
+ VERIFY_NO_ERROR(errorInfo);
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ const QString qbsFileName("change-dependent-lib.qbs");
+ QFile qbsFile(qbsFileName);
+ QVERIFY(qbsFile.open(QIODevice::ReadWrite));
+@@ -761,7 +763,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+ QVERIFY(!bdr.descriptions.contains("compiling"));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile projectFile("project.qbs");
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ QByteArray content = projectFile.readAll();
+@@ -774,7 +776,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+ QVERIFY(bdr.descriptions.contains("linking"));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ touch("main.cpp");
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ content = projectFile.readAll();
+@@ -882,7 +884,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+ QVERIFY(!receiver.descriptions.contains("Creating output artifact"));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ touch("dependency.txt");
+ errorInfo = doBuildProject("explicitly-depends-on/project.qbs", &receiver);
+ VERIFY_NO_ERROR(errorInfo);
+@@ -971,7 +973,7 @@
+ qbs::ErrorInfo errorInfo = doBuildProject(projectFilePath);
+ VERIFY_NO_ERROR(errorInfo);
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile projectFile(m_workingDataDir + '/' + projectFilePath);
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ QByteArray content = projectFile.readAll();
+@@ -1079,7 +1081,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+
+ // Touch header and try again.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile headerFile("object.h");
+ QVERIFY2(headerFile.open(QIODevice::WriteOnly | QIODevice::Append),
+ qPrintable(headerFile.errorString()));
+@@ -1089,7 +1091,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+
+ // Touch cpp file and try again.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile cppFile("object.cpp");
+ QVERIFY2(cppFile.open(QIODevice::WriteOnly | QIODevice::Append),
+ qPrintable(cppFile.errorString()));
+@@ -1205,7 +1207,7 @@
+ QVERIFY(!receiver.descriptions.contains(linkingLibString));
+ receiver.descriptions.clear();
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile projectFile("project.qbs");
+ QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString()));
+ QByteArray contents = projectFile.readAll();
+@@ -1295,13 +1297,13 @@
+ QVERIFY2(!setupJob->error().hasError(), qPrintable(setupJob->error().toString()));
+ qbs::Project project = setupJob->project();
+ QVERIFY(project.isValid());
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ copyFileAndUpdateTimestamp("project.early-error.qbs", "project.qbs");
+ setupJob.reset(project.setupProject(setupParams, m_logSink, 0));
+ waitForFinished(setupJob.data());
+ QVERIFY(setupJob->error().hasError());
+ QVERIFY(project.isValid()); // Error in Loader, old project still valid.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ copyFileAndUpdateTimestamp("project.late-error.qbs", "project.qbs");
+ setupJob.reset(project.setupProject(setupParams, m_logSink, 0));
+ waitForFinished(setupJob.data());
+@@ -1427,7 +1429,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+
+ // Rename lib and adapt Depends item.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile f("rename.qbs");
+ QVERIFY(f.open(QIODevice::ReadWrite));
+ QByteArray contents = f.readAll();
+@@ -1439,7 +1441,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+
+ // Rename lib and don't adapt Depends item.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(f.open(QIODevice::ReadWrite));
+ contents = f.readAll();
+ const int libNameIndex = contents.lastIndexOf("thelib");
+@@ -1465,7 +1467,7 @@
+ receiver.descriptions.clear();
+
+ // Rename library file name.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile f("rename.qbs");
+ QVERIFY(f.open(QIODevice::ReadWrite));
+ QByteArray contents = f.readAll();
+@@ -1568,7 +1570,7 @@
+
+ // Disabling both the project with the dependency and the one with the dependent
+ // should not cause an error.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile f(params.projectFilePath());
+ QVERIFY(f.open(QIODevice::ReadWrite));
+ QByteArray contents = f.readAll();
+@@ -1588,7 +1590,7 @@
+
+ // Disabling the project with the dependency only is an error.
+ // This tests also whether changes in sub-projects are detected.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ f.setFileName(params.projectFilePath());
+ QVERIFY(f.open(QIODevice::ReadWrite));
+ contents = f.readAll();
+@@ -1617,7 +1619,7 @@
+ QVERIFY(errorInfo.hasError());
+ QVERIFY2(isAboutUndefinedSymbols(receiver.output), qPrintable(receiver.output));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(qbsFile.open(QIODevice::WriteOnly | QIODevice::Truncate));
+ qbsFile.write("import qbs.base 1.0
CppApplication {
Depends { name: 'Qt.core' }
"
+ " files: ['main.cpp', 'myobject.cpp','myobject.h']
}");
+@@ -1639,7 +1641,7 @@
+ qbs::ErrorInfo errorInfo = doBuildProject("missing-qobject-header/missingheader.qbs");
+ VERIFY_NO_ERROR(errorInfo);
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(qbsFile.open(QIODevice::WriteOnly | QIODevice::Truncate));
+ qbsFile.write("import qbs.base 1.0
CppApplication {
Depends { name: 'Qt.core' }
"
+ " files: ['main.cpp', 'myobject.cpp']
}");
+@@ -1663,7 +1665,7 @@
+ VERIFY_NO_ERROR(errorInfo);
+ QVERIFY2(!receiver.descriptions.contains("compiling"), qPrintable(receiver.descriptions));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile projectFile("project.qbs");
+ QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString()));
+ QByteArray content = projectFile.readAll();
+--- a/tests/auto/blackbox/tst_blackbox.cpp
++++ b/tests/auto/blackbox/tst_blackbox.cpp
+@@ -50,6 +50,8 @@
+ #define Q_MV_OSX(major, minor) (major == 10 ? minor + 2 : (major == 9 ? 1 : 0))
+ #endif
+
++#define WAIT_FOR_NEW_TIMESTAMP() waitForNewTimestamp(testDataDir)
++
+ using qbs::InstallOptions;
+ using qbs::Internal::HostOsInfo;
+ using qbs::Internal::removeDirectoryWithContents;
+@@ -370,7 +372,7 @@
+ QCOMPARE(m_qbsStdout.count("compiling"), 3);
+ QCOMPARE(m_qbsStdout.count("creating"), 3);
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ touch(QDir::currentPath() + "/main.cpp");
+
+ // Now only the file marked as changed must be compiled, even though it hasn't really
+@@ -386,7 +388,7 @@
+ {
+ QDir::setCurrent(testDataDir + "/change-in-disabled-product");
+ QCOMPARE(runQbs(), 0);
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile projectFile("project.qbs");
+ QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString()));
+ QByteArray content = projectFile.readAll();
+@@ -585,7 +587,7 @@
+ QDir::setCurrent(testDataDir + "/renameDependency/work");
+ QCOMPARE(runQbs(), 0);
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile::remove("lib.h");
+ QFile::remove("lib.cpp");
+ ccp("../after", ".");
+@@ -630,7 +632,7 @@
+ const QString fileName = relativeExecutableFilePath("i");
+ QVERIFY2(regularFileExists(fileName), qPrintable(fileName));
+ QDateTime dt = QFileInfo(fileName).lastModified();
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ {
+ QFile f("stuff.txt");
+ f.remove();
+@@ -654,7 +656,7 @@
+ + inputDirHash("GeneratedFiles") + objectFileName("/moc_bla.cpp", profileName());
+ QVERIFY2(regularFileExists(moc_bla_objectFileName), qPrintable(moc_bla_objectFileName));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ copyFileAndUpdateTimestamp("bla_noqobject.h", "bla.h");
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(regularFileExists(productFilePath));
+@@ -684,7 +686,7 @@
+ + objectFileName("/someapp/narf.cpp", profileName());
+ QDateTime unchangedObjectFileTime1 = QFileInfo(unchangedObjectFile).lastModified();
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ ccp("../after", ".");
+ touch("project.qbs");
+ touch("main.cpp");
+@@ -728,7 +730,7 @@
+ QVERIFY(!m_qbsStdout.contains("compiling jsFileChange.cpp"));
+ QVERIFY(!m_qbsStdout.contains("compiling fileExists.cpp"));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile jsFile("fileList.js");
+ QVERIFY(jsFile.open(QIODevice::ReadWrite));
+ QByteArray jsCode = jsFile.readAll();
+@@ -791,7 +793,7 @@
+ + objectFileName("/someapp/narf.cpp", profileName());
+ QDateTime unchangedObjectFileTime1 = QFileInfo(unchangedObjectFile).lastModified();
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile::remove("project.qbs");
+ QFile::remove("main.cpp");
+ QFile::copy("../before/project.qbs", "project.qbs");
+@@ -840,7 +842,7 @@
+ output = process.readAllStandardOutput().split('
');
+ QCOMPARE(output.takeFirst().trimmed().constData(), "there's no foo here");
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ ccp("../after", ".");
+ touch("main.cpp");
+ touch("project.qbs");
+@@ -879,7 +881,7 @@
+ output = process.readAllStandardOutput().split('
');
+ QCOMPARE(output.takeFirst().trimmed().constData(), "there's 15 foo here");
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ ccp("../before", ".");
+ touch("main.cpp");
+ touch("project.qbs");
+@@ -912,7 +914,7 @@
+ params.expectFailure = true;
+ QVERIFY(runQbs(params) != 0);
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ ccp("../after", ".");
+ touch("main.cpp");
+ QCOMPARE(runQbs(), 0);
+@@ -933,7 +935,7 @@
+ QVERIFY(m_qbsStdout.contains("linking product1"));
+ QVERIFY(m_qbsStdout.contains("linking product2"));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ ccp("../after", ".");
+ touch("trackProducts.qbs");
+ QCOMPARE(runQbs(params), 0);
+@@ -963,7 +965,7 @@
+ QVERIFY(m_qbsStdout.contains("linking product2"));
+ QVERIFY(m_qbsStdout.contains("linking product3"));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile::remove("zoo.cpp");
+ QFile::remove("product3.qbs");
+ copyFileAndUpdateTimestamp("../before/trackProducts.qbs", "trackProducts.qbs");
+@@ -994,7 +996,7 @@
+ QCOMPARE(runQbs(QbsRunParameters("install")), 0);
+ QVERIFY(QFileInfo(defaultInstallRoot + "/dir/wasser.txt").exists());
+ QVERIFY(QFileInfo(defaultInstallRoot + "/dir/subdir/blubb.txt").exists());
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(QFile::rename(QDir::currentPath() + "/dir/wasser.txt", QDir::currentPath() + "/dir/wein.txt"));
+ QCOMPARE(runQbs(QbsRunParameters(QLatin1String("install"),
+ QStringList("--clean-install-root"))), 0);
+@@ -1097,7 +1099,7 @@
+ QVERIFY(!m_qbsStdout.contains("Making output from other output"));
+
+ // Incremental build with no changes, but updated project file timestamp.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(projectFile.open(QIODevice::ReadWrite | QIODevice::Append));
+ projectFile.write("
");
+ projectFile.close();
+@@ -1112,7 +1114,7 @@
+ QVERIFY(!m_qbsStdout.contains("Making output from other output"));
+
+ // Incremental build, input property changed for first product
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ QByteArray contents = projectFile.readAll();
+ contents.replace("blubb1", "blubb01");
+@@ -1130,7 +1132,7 @@
+ QVERIFY(!m_qbsStdout.contains("Making output from other output"));
+
+ // Incremental build, input property changed via project for second product.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ contents = projectFile.readAll();
+ contents.replace("blubb2", "blubb02");
+@@ -1197,7 +1199,7 @@
+ QVERIFY(!m_qbsStdout.contains("Making output from other output"));
+
+ // Incremental build, non-essential dependency removed.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ contents = projectFile.readAll();
+ contents.replace("Depends { name: 'library' }", "// Depends { name: 'library' }");
+@@ -1214,7 +1216,7 @@
+ QVERIFY(!m_qbsStdout.contains("Making output from other output"));
+
+ // Incremental build, prepare script of a transformer changed.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ contents = projectFile.readAll();
+ contents.replace("contents 1", "contents 2");
+@@ -1234,7 +1236,7 @@
+ generatedFile.close();
+
+ // Incremental build, product property used in JavaScript command changed.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ contents = projectFile.readAll();
+ contents.replace("prefix 1", "prefix 2");
+@@ -1254,7 +1256,7 @@
+ generatedFile.close();
+
+ // Incremental build, project property used in JavaScript command changed.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ contents = projectFile.readAll();
+ contents.replace("suffix 1", "suffix 2");
+@@ -1274,7 +1276,7 @@
+ generatedFile.close();
+
+ // Incremental build, prepare script of a rule in a module changed.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile moduleFile("modules/TestModule/module.qbs");
+ QVERIFY(moduleFile.open(QIODevice::ReadWrite));
+ contents = moduleFile.readAll();
+@@ -1308,7 +1310,7 @@
+ QCOMPARE(runQbs(), 0);
+ const QString outputFilePath = relativeProductBuildDir("dynamicMultiplexRule") + "/stuff-from-3-inputs";
+ QVERIFY(regularFileExists(outputFilePath));
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ touch("two.txt");
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(regularFileExists(outputFilePath));
+@@ -1337,7 +1339,7 @@
+ QVERIFY(!QFile::exists(sourceFile2));
+
+ QDateTime appFileTimeStamp1 = QFileInfo(appFile).lastModified();
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ copyFileAndUpdateTimestamp("../after/numbers.l", "numbers.l");
+ QCOMPARE(runQbs(), 0);
+
+@@ -1349,7 +1351,7 @@
+ QVERIFY(!QFile::exists(sourceFile1));
+ QVERIFY(regularFileExists(sourceFile2));
+
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ copyFileAndUpdateTimestamp("../before/numbers.l", "numbers.l");
+ QCOMPARE(runQbs(), 0);
+
+@@ -1407,14 +1409,14 @@
+ QVERIFY(!m_qbsStdout.contains("linking"));
+
+ // Incremental build with changed file dependency.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ touch("awesomelib/awesome.h");
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("compiling narf.cpp"));
+ QVERIFY(!m_qbsStdout.contains("compiling zort.cpp"));
+
+ // Incremental build with changed 2nd level file dependency.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ touch("awesomelib/magnificent.h");
+ QCOMPARE(runQbs(), 0);
+ QVERIFY(m_qbsStdout.contains("compiling narf.cpp"));
+@@ -2076,7 +2078,7 @@
+ // Step 1: Have a directory where a file used to be.
+ QbsRunParameters params(QStringList() << "-f" << projectFileName);
+ QCOMPARE(runQbs(params), 0);
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ QFile projectFile(projectFileName);
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ QByteArray content = projectFile.readAll();
+@@ -2086,14 +2088,14 @@
+ projectFile.flush();
+ params.expectFailure = true;
+ QVERIFY(runQbs(params) != 0);
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ content.replace("oldfile/newfile", "newfile");
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.flush();
+ params.expectFailure = false;
+ QCOMPARE(runQbs(params), 0);
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ content.replace("newfile", "oldfile/newfile");
+ projectFile.resize(0);
+ projectFile.write(content);
+@@ -2101,21 +2103,21 @@
+ QCOMPARE(runQbs(params), 0);
+
+ // Step 2: Have a file where a directory used to be.
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ content.replace("oldfile/newfile", "oldfile");
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.flush();
+ params.expectFailure = true;
+ QVERIFY(runQbs(params) != 0);
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ content.replace("oldfile", "newfile");
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.flush();
+ params.expectFailure = false;
+ QCOMPARE(runQbs(params), 0);
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ content.replace("newfile", "oldfile");
+ projectFile.resize(0);
+ projectFile.write(content);
+@@ -2168,7 +2170,7 @@
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ QByteArray content = projectFile.readAll();
+ content.replace("qbs.installPrefix: \"/usr\"", "qbs.installPrefix: '/usr/local'");
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ projectFile.resize(0);
+ projectFile.write(content);
+ QVERIFY(projectFile.flush());
+@@ -2179,7 +2181,7 @@
+
+ // Check whether changing install parameters on the artifact causes re-installation.
+ content.replace("qbs.installDir: \"bin\"", "qbs.installDir: 'custom'");
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ projectFile.resize(0);
+ projectFile.write(content);
+ QVERIFY(projectFile.flush());
+@@ -2189,7 +2191,7 @@
+
+ // Check whether changing install parameters on a source file causes re-installation.
+ content.replace("qbs.installDir: \"src\"", "qbs.installDir: 'source'");
+- waitForNewTimestamp();
++ WAIT_FOR_NEW_TIMESTAMP();
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.close();
--
qbs packaging
More information about the pkg-kde-commits
mailing list