summaryrefslogtreecommitdiffstats
path: root/tests/arthur
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2010-10-26 10:39:47 (GMT)
committeraavit <qt-info@nokia.com>2010-10-26 10:39:47 (GMT)
commit789ae99928f96a7fc66ff9dacf6bbf5826d24cac (patch)
tree80be57bf3a09d23aacf4187f031fee0e0ed0bfd5 /tests/arthur
parent499b864a4bebb3176ba44141714e18687e9000bd (diff)
downloadQt-789ae99928f96a7fc66ff9dacf6bbf5826d24cac.zip
Qt-789ae99928f96a7fc66ff9dacf6bbf5826d24cac.tar.gz
Qt-789ae99928f96a7fc66ff9dacf6bbf5826d24cac.tar.bz2
Fix getting git info on Win
Diffstat (limited to 'tests/arthur')
-rw-r--r--tests/arthur/common/baselineprotocol.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp
index a7fb5be..6a35115 100644
--- a/tests/arthur/common/baselineprotocol.cpp
+++ b/tests/arthur/common/baselineprotocol.cpp
@@ -32,7 +32,16 @@ PlatformInfo::PlatformInfo(bool useLocal)
#endif
QProcess git;
- git.start(QLS("git"), QStringList() << QLS("log") << QLS("--max-count=1") << QLS("--pretty=%H"));
+ QString cmd;
+ QStringList args;
+#if defined(Q_OS_WIN)
+ cmd = QLS("cmd.exe");
+ args << QLS("/c") << QLS("git");
+#else
+ cmd = QLS("git");
+#endif
+ args << QLS("log") << QLS("--max-count=1") << QLS("--pretty=%H");
+ git.start(cmd, args);
git.waitForFinished(3000);
if (!git.exitCode())
gitCommit = QString::fromLocal8Bit(git.readAllStandardOutput().constData()).trimmed();