summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/arch/arch.pro1
-rw-r--r--config.tests/arch/arch_host.pro2
-rw-r--r--config.tests/qpa/linuxfb/linuxfb.cpp1
-rwxr-xr-xconfig.tests/unix/arch.test28
-rw-r--r--config.tests/unix/clock-monotonic/clock-monotonic.cpp2
-rwxr-xr-xconfig.tests/unix/compile.test9
-rw-r--r--config.tests/unix/eventfd/eventfd.pro3
-rw-r--r--config.tests/unix/eventfd/main.cpp51
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfotest.cpp2
9 files changed, 74 insertions, 25 deletions
diff --git a/config.tests/arch/arch.pro b/config.tests/arch/arch.pro
index c6801264b4..fda4acc601 100644
--- a/config.tests/arch/arch.pro
+++ b/config.tests/arch/arch.pro
@@ -1,3 +1,4 @@
+TARGET = arch
SOURCES = arch.cpp
CONFIG -= qt dylib release debug_and_release
CONFIG += debug console
diff --git a/config.tests/arch/arch_host.pro b/config.tests/arch/arch_host.pro
new file mode 100644
index 0000000000..f7acef0c5d
--- /dev/null
+++ b/config.tests/arch/arch_host.pro
@@ -0,0 +1,2 @@
+option(host_build)
+include(arch.pro)
diff --git a/config.tests/qpa/linuxfb/linuxfb.cpp b/config.tests/qpa/linuxfb/linuxfb.cpp
index 892c3d9eae..81a257864e 100644
--- a/config.tests/qpa/linuxfb/linuxfb.cpp
+++ b/config.tests/qpa/linuxfb/linuxfb.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include <linux/fb.h>
+#include <sys/kd.h>
#include <sys/ioctl.h>
int main(int, char **)
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test
index dacdcda8bf..e65541cda7 100755
--- a/config.tests/unix/arch.test
+++ b/config.tests/unix/arch.test
@@ -5,26 +5,20 @@ VERBOSE=$2
SRCDIR=$3
OUTDIR=$4
RESULTFILE=$5
-VARPREFIX=$6
+TARGET=$6
shift 6
+if [ "$TARGET" = "host" ]; then
+ VARPREFIX="CFG_HOST"
+ PROSUFFIX="_host"
+else
+ VARPREFIX="CFG"
+ PROSUFFIX=""
+fi
+
LFLAGS="$SYSROOT_FLAG"
CXXFLAGS="$SYSROOT_FLAG"
-while [ "$#" -gt 0 ]; do
- PARAM=$1
- case $PARAM in
- -sdk)
- LFLAGS="$LFLAGS -Wl,-syslibroot,$2"
- CXXFLAGS="$CXXFLAGS -isysroot $2"
- shift
- ;;
- *) ;;
- esac
- shift
-done
-
-
# debuggery
[ "$VERBOSE" = "yes" ] && echo "Determining architecture... ($*)"
@@ -32,7 +26,7 @@ done
test -d "$OUTDIR/config.tests/arch" || mkdir -p "$OUTDIR/config.tests/arch"
cd "$OUTDIR/config.tests/arch"
[ -f Makefile ] && $MAKE distclean >/dev/null 2>&1
-OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "$SRCDIR/config.tests/arch/arch.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
+OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
ARCH=""
@@ -42,6 +36,8 @@ if [ -f ./arch.exe ]; then
binary=./arch.exe
elif [ -f ./arch ]; then
binary=./arch
+elif [ -f ./libarch.so ]; then
+ binary=./libarch.so
else
[ "$VERBOSE" = "yes" ] && echo "Unable to determine architecture!"
exit 2
diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.cpp b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
index 27a653600c..7b7d92bef5 100644
--- a/config.tests/unix/clock-monotonic/clock-monotonic.cpp
+++ b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
@@ -50,7 +50,7 @@ int main(int, char **)
#else
# error "Feature _POSIX_MONOTONIC_CLOCK not available"
// MIPSpro doesn't understand #error, so force a compiler error
- force_compiler_error = true;
+ force_compiler_error = true;
#endif
return 0;
}
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
index 3f8c5c51a2..6b90044009 100755
--- a/config.tests/unix/compile.test
+++ b/config.tests/unix/compile.test
@@ -32,11 +32,6 @@ while [ "$#" -gt 0 ]; do
MAC_ARCH_LFLAGS="$MAC_ARCH_LFLAGS -arch $2"
shift
;;
- -sdk)
- LFLAGS="$LFLAGS -Wl,-syslibroot,$2"
- CXXFLAGS="$CXXFLAGS -isysroot $2"
- shift
- ;;
-F*|-m*|-x*)
LFLAGS="$LFLAGS $PARAM"
CXXFLAGS="$CXXFLAGS $PARAM"
@@ -72,7 +67,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1
# Make sure output from possible previous tests is gone
rm -f "$EXE" "${EXE}.exe"
-set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
OUTDIR=$OUTDIR "$@"
$MAKE
@@ -81,7 +76,7 @@ else
$MAKE >/dev/null 2>&1
fi
-( [ -x "$EXE" ] || [ -x "${EXE}.exe" ] ) && SUCCESS=yes
+( [ -f "$EXE" ] || [ -f "${EXE}.exe" ] ) && SUCCESS=yes
# done
if [ "$SUCCESS" != "yes" ]; then
diff --git a/config.tests/unix/eventfd/eventfd.pro b/config.tests/unix/eventfd/eventfd.pro
new file mode 100644
index 0000000000..c41204f49f
--- /dev/null
+++ b/config.tests/unix/eventfd/eventfd.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/eventfd/main.cpp b/config.tests/unix/eventfd/main.cpp
new file mode 100644
index 0000000000..0523ee0320
--- /dev/null
+++ b/config.tests/unix/eventfd/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Intel Corporation
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sys/eventfd.h>
+
+int main()
+{
+ eventfd_t value;
+ int fd = eventfd(0, EFD_CLOEXEC);
+ eventfd_read(fd, &value);
+ eventfd_write(fd, value);
+ return 0;
+}
diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
index d8dc343f2e..c8c8eb41da 100644
--- a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
+++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
@@ -59,6 +59,6 @@ int main()
if (getaddrinfo("foo", 0, 0, &res) == 0)
freeaddrinfo(res);
gai_strerror(0);
-
+
return 0;
}