diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-03-24 14:55:23 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-03-24 18:07:16 +0100 |
commit | ca3adabbf02dae85876bedf28eccea60c79365f4 (patch) | |
tree | e834ef1c7ad2758eeed6f0b502621dcd3c607e19 /tests | |
parent | 4062c2ad9cbb8f7a8eeea3fb82892d815743a481 (diff) |
Introduce abstraction layer for QSKIP.
We might want to skip tests in other files as well.
Change-Id: Ia2352fdf472b461fb3d9ed6134789b4f56d126e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/blackbox/blackbox.qbs | 2 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 9 | ||||
-rw-r--r-- | tests/auto/skip.h | 38 |
3 files changed, 42 insertions, 7 deletions
diff --git a/tests/auto/blackbox/blackbox.qbs b/tests/auto/blackbox/blackbox.qbs index f7c28939b..eb227df4b 100644 --- a/tests/auto/blackbox/blackbox.qbs +++ b/tests/auto/blackbox/blackbox.qbs @@ -2,6 +2,6 @@ import "../autotest.qbs" as AutoTest AutoTest { testName: "blackbox" - files: ["tst_blackbox.h", "tst_blackbox.cpp"] + files: ["../skip.h", "tst_blackbox.h", "tst_blackbox.cpp", ] cpp.defines: base.concat(['SRCDIR="' + path + '"']) } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 76f9d6b6a..b28e7ba8d 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -28,6 +28,9 @@ ****************************************************************************/ #include "tst_blackbox.h" + +#include "../skip.h" + #include <app/shared/qbssettings.h> #include <tools/fileinfo.h> #include <tools/hostosinfo.h> @@ -39,12 +42,6 @@ #include <QScriptEngine> #include <QScriptValue> -#if QT_VERSION >= 0x050000 -#define SKIP_TEST(message) QSKIP(message) -#else -#define SKIP_TEST(message) QSKIP(message, SkipAll) -#endif - using qbs::InstallOptions; using qbs::Internal::HostOsInfo; using qbs::Internal::removeDirectoryWithContents; diff --git a/tests/auto/skip.h b/tests/auto/skip.h new file mode 100644 index 000000000..7da4e6110 --- /dev/null +++ b/tests/auto/skip.h @@ -0,0 +1,38 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Build Suite. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ +#ifndef QBS_TEST_SKIP_H +#define QBS_TEST_SKIP_H + +#if QT_VERSION >= 0x050000 +#define SKIP_TEST(message) QSKIP(message) +#else +#define SKIP_TEST(message) QSKIP(message, SkipAll) +#endif + +#endif // Include guard. |