summaryrefslogtreecommitdiff
path: root/tests/auto/shared.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-09-22 14:19:29 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-09-29 13:17:59 +0200
commit05cb6aff3b95d463d506e7295cb32018722038fb (patch)
tree67b38f7741c59837872b459372b2c671cf5ac1f9 /tests/auto/shared.h
parent18a263188753a13704a590c3b54dc7bc86f72360 (diff)
downloadqbs-05cb6aff3b95d463d506e7295cb32018722038fb.tar.gz
libqtprofilesetup: Fix mingw use case.
- Don't assume the mkspec has "mingw" in its name. - Relax overly pedantic tests in gcc.js: If a library name is an actual file path, then use it as one, regardless of what it looks like. - Some autotest adaptations. Task-number: QBS-688 Change-Id: I1d0d51b04ae81d4c10f8cdcc18d6447233e44863 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/shared.h')
-rw-r--r--tests/auto/shared.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/shared.h b/tests/auto/shared.h
index e0920363f..2c4476db1 100644
--- a/tests/auto/shared.h
+++ b/tests/auto/shared.h
@@ -30,6 +30,8 @@
#define QBS_TEST_SHARED_H
#include <tools/hostosinfo.h>
+#include <tools/profile.h>
+#include <tools/settings.h>
#include <QFile>
#include <QtTest>
@@ -67,4 +69,13 @@ inline void copyFileAndUpdateTimestamp(const QString &source, const QString &tar
touch(target);
}
+inline QString objectFileName(const QString &baseName, const QString &profileName)
+{
+ qbs::Settings settings((QString()));
+ qbs::Profile profile(profileName, &settings);
+ const QString suffix = profile.value("qbs.toolchain").toStringList().contains("msvc")
+ ? "obj" : "o";
+ return baseName + '.' + suffix;
+}
+
#endif // Include guard.