From f759731312946948384a7bc0804ae36ef1fd6e0a Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Date: Wed, 21 Mar 2018 15:03:13 +0100
Subject: [PATCH] Minor cleanups

---
 README.md                        |  2 +-
 scripts/build-qtbase-tests.sh    |  2 +-
 scripts/build-qtwayland-tests.sh |  2 +-
 scripts/clone-qt.sh              | 11 +++++++----
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index e1fd3d9..177b3bf 100644
--- a/README.md
+++ b/README.md
@@ -14,4 +14,4 @@ Build:
 
 Run:
 
-    $ docker run -it docker-qt-tests
+    $ docker run -e QT_DOCKERTEST_QTWAYLAND_REV=<sha1> -it docker-qt-tests
diff --git a/scripts/build-qtbase-tests.sh b/scripts/build-qtbase-tests.sh
index 00971c5..f0d8d12 100755
--- a/scripts/build-qtbase-tests.sh
+++ b/scripts/build-qtbase-tests.sh
@@ -1,4 +1,4 @@
 #!/bin/bash
 set -ex
 cd ~/build-qt/qtbase
-make sub-tests
+make sub-tests -ks
diff --git a/scripts/build-qtwayland-tests.sh b/scripts/build-qtwayland-tests.sh
index 2fbccda..8654a0d 100755
--- a/scripts/build-qtwayland-tests.sh
+++ b/scripts/build-qtwayland-tests.sh
@@ -1,4 +1,4 @@
 #!/bin/bash
 set -ex
 cd ~/build-qt/qtwayland
-make sub-tests
+make sub-tests -ks
diff --git a/scripts/clone-qt.sh b/scripts/clone-qt.sh
index 0ae4eb7..d2fdd50 100755
--- a/scripts/clone-qt.sh
+++ b/scripts/clone-qt.sh
@@ -1,9 +1,12 @@
 #!/bin/bash
 set -ex
 qt5_rev=${QT_DOCKERTEST_QT5_REV:-5.11}
-rm -rf qt5
-mkdir qt5
-cd qt5
+
+srcdir=$(pwd)/qt5
+rm -rf $srcdir
+mkdir $srcdir
+cd $srcdir
+
 git init
 git remote add origin https://codereview.qt-project.org/qt/qt5.git
 git fetch --depth 1 origin "$qt5_rev"
@@ -14,7 +17,7 @@ git checkout FETCH_HEAD
 git submodule update --init --depth 50 -- qtbase qtxmlpatterns qtdeclarative qtwayland
 
 if [[ -v QT_DOCKERTEST_QTWAYLAND_REV ]] ; then
-    cd qtwayland
+    cd "$srcdir/qtwayland"
     git fetch --depth 1 origin "$QT_DOCKERTEST_QTWAYLAND_REV"
     git checkout FETCH_HEAD
 fi
-- 
GitLab