Skip to content

Commit

Permalink
Merge PR #2896: src/tests: make all test .pro files 'inherit' from co…
Browse files Browse the repository at this point in the history
…mmon test.pri file.
  • Loading branch information
mkrautz committed Mar 2, 2017
2 parents 839237c + 1560970 commit a90fc60
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 95 deletions.
18 changes: 2 additions & 16 deletions src/tests/TestCrypt/TestCrypt.pro
Expand Up @@ -3,25 +3,11 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

include(../../../compiler.pri)
include(../test.pri)
include(../../../qmake/openssl.pri)

TEMPLATE = app
QT = core network testlib
CONFIG += testcase
CONFIG += thread warn_on
CONFIG -= app_bundle
QT *= network

# We build this test with 'gui' in QT,
# but we include the QtGui headers from
# murmur_pch.h. Define QT_NO_OPENGL to
# avoid build errors about a missing GLES/gles2.h
# header.
DEFINES += QT_NO_OPENGL

LANGUAGE = C++
TARGET = TestCrypt
HEADERS = Timer.h CryptState.h
SOURCES = TestCrypt.cpp CryptState.cpp Timer.cpp
VPATH += ../..
INCLUDEPATH += ../.. ../../murmur ../../mumble
18 changes: 1 addition & 17 deletions src/tests/TestCryptographicHash/TestCryptographicHash.pro
Expand Up @@ -3,25 +3,9 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

include(../../../compiler.pri)
include(../test.pri)
include(../../../qmake/openssl.pri)

TEMPLATE = app
QT = core testlib
CONFIG += testcase
CONFIG += warn_on
CONFIG -= app_bundle

# We build this test with 'gui' in QT,
# but we include the QtGui headers from
# murmur_pch.h. Define QT_NO_OPENGL to
# avoid build errors about a missing GLES/gles2.h
# header.
DEFINES += QT_NO_OPENGL

LANGUAGE = C++
TARGET = TestCryptographicHash
SOURCES = TestCryptographicHash.cpp CryptographicHash.cpp
HEADERS = CryptographicHash.h
VPATH += ../..
INCLUDEPATH += ../.. ../../murmur ../../mumble
22 changes: 4 additions & 18 deletions src/tests/TestCryptographicRandom/TestCryptographicRandom.pro
Expand Up @@ -3,26 +3,12 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

include(../../../compiler.pri)
include(../test.pri)
include(../../../qmake/openssl.pri)

TEMPLATE = app
QT = core testlib
CONFIG += testcase
CONFIG += qt warn_on
CONFIG -= app_bundle
LANGUAGE = C++

# We build this test with 'gui' in QT,
# but we include the QtGui headers from
# murmur_pch.h. Define QT_NO_OPENGL to
# avoid build errors about a missing GLES/gles2.h
# header.
DEFINES += QT_NO_OPENGL

TARGET = TestCryptographicRandom
SOURCES = TestCryptographicRandom.cpp CryptographicRandom.cpp arc4random_uniform.cpp
HEADERS = CryptographicHash.h
VPATH += ../..
VPATH += ../../../3rdparty/arc4random-src
INCLUDEPATH += ../.. ../../murmur ../../mumble ../../../3rdparty/arc4random-src

VPATH *= ../../../3rdparty/arc4random-src
INCLUDEPATH *= ../../../3rdparty/arc4random-src
11 changes: 4 additions & 7 deletions src/tests/TestPacketDataStream/TestPacketDataStream.pro
Expand Up @@ -3,12 +3,9 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

TEMPLATE = app
QT = core network testlib
CONFIG += testcase
CONFIG += qt thread warn_on
CONFIG -= app_bundle
LANGUAGE = C++
include(../test.pri)

QT *= network

TARGET = TestPacketDataStream
SOURCES = TestPacketDataStream.cpp
INCLUDEPATH += ../.. ../../murmur ../../mumble
24 changes: 4 additions & 20 deletions src/tests/TestPasswordGenerator/TestPasswordGenerator.pro
Expand Up @@ -3,28 +3,12 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

include(../../../compiler.pri)
include(../test.pri)
include(../../../qmake/openssl.pri)

TEMPLATE = app
QT = core testlib
CONFIG += testcase
CONFIG += warn_on
CONFIG -= app_bundle

# We build this test without 'gui' in QT,
# but we include the QtGui headers from
# murmur_pch.h. This causes an error when Qt
# tries to find the OpenGL headers to use, since
# we're missing the include paths from QtGui's
# .pri files. Define QT_NO_OPENGL to avoid these
# build errors.
DEFINES += QT_NO_OPENGL

LANGUAGE = C++
TARGET = TestPasswordGenerator
SOURCES = TestPasswordGenerator.cpp PasswordGenerator.cpp CryptographicRandom.cpp arc4random_uniform.cpp
HEADERS = PasswordGenerator.h CryptographicHash.h
VPATH += ../..
VPATH += ../../../3rdparty/arc4random-src
INCLUDEPATH += ../.. ../../murmur ../../mumble ../../../3rdparty/arc4random-src

VPATH *= ../../../3rdparty/arc4random-src
INCLUDEPATH *= ../../../3rdparty/arc4random-src
18 changes: 1 addition & 17 deletions src/tests/TestTimer/TestTimer.pro
Expand Up @@ -3,24 +3,8 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

include(../../../compiler.pri)
include(../test.pri)

TEMPLATE = app
QT = core testlib
CONFIG += testcase
CONFIG += warn_on
CONFIG -= app_bundle

# We build this test with 'gui' in QT,
# but we include the QtGui headers from
# murmur_pch.h. Define QT_NO_OPENGL to
# avoid build errors about a missing GLES/gles2.h
# header.
DEFINES += QT_NO_OPENGL

LANGUAGE = C++
TARGET = TestTimer
SOURCES = TestTimer.cpp Timer.cpp
HEADERS = Timer.h
VPATH += ../..
INCLUDEPATH += ../.. ../../murmur ../../mumble
28 changes: 28 additions & 0 deletions src/tests/test.pri
@@ -0,0 +1,28 @@
# Copyright 2005-2017 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.

# Common include file for tests.

include(../../compiler.pri)

TEMPLATE = app
QT = core testlib
CONFIG += testcase
CONFIG += thread warn_on
CONFIG -= app_bundle

# We build this test without 'gui' in QT,
# but we include the QtGui headers from
# murmur_pch.h. This causes an error when Qt
# tries to find the OpenGL headers to use, since
# we're missing the include paths from QtGui's
# .pri files. Define QT_NO_OPENGL to avoid these
# build errors.
DEFINES += QT_NO_OPENGL

LANGUAGE = C++

VPATH *= ../..
INCLUDEPATH *= ../.. ../../murmur ../../mumble

0 comments on commit a90fc60

Please sign in to comment.