summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex <qt-info@nokia.com>2009-09-10 13:04:15 +1000
committerAlex <qt-info@nokia.com>2009-09-10 13:04:15 +1000
commitb6297b985dfa2fa5d5792a5f50c4271462b32502 (patch)
treebdc595a8a1e38cbe482ab47f377204c5327edbc5
parent04f01cc9273d3af2f7f8997ab2bbf8ee3f35c11a (diff)
integrate sysinfo unit tests
-rw-r--r--bin/rununittests.bat11
-rwxr-xr-xbin/rununittests.sh18
-rw-r--r--tests/auto/qsystemdeviceinfo/qsystemdeviceinfo.pro5
-rw-r--r--tests/auto/qsystemdisplayinfo/qsystemdisplayinfo.pro4
-rw-r--r--tests/auto/qsysteminfo/qsysteminfo.pro5
-rw-r--r--tests/auto/qsystemmemoryinfo/qsystemmemoryinfo.pro6
-rw-r--r--tests/auto/qsystemnetworkinfo/qsystemnetworkinfo.pro4
7 files changed, 31 insertions, 22 deletions
diff --git a/bin/rununittests.bat b/bin/rununittests.bat
index 55c91c0e12..8dc155e072 100644
--- a/bin/rununittests.bat
+++ b/bin/rununittests.bat
@@ -1,9 +1,9 @@
set SAVED_PWD="%CD%"
set BATCH_PATH=%~dp0
-set PATH=%BATCH_PATH%..\build\Debug\bin;%PATH%
+set PATH=%BATCH_PATH%..\lib;%PATH%
-cd %BATCH_PATH%..\build\tests\Debug\bin
+cd %BATCH_PATH%..\build\tests\bin
::ServiceFramework
tst_servicemetadata.exe
@@ -39,5 +39,12 @@ tst_qvaluespaceitem.exe
tst_qsystemreadwritelock.exe
tst_qsystemreadwritelock_oop.exe
+::QSystemInformation
+tst_qsystemdeviceinfo.exe
+tst_qsystemdisplayinfo.exe
+tst_qsysteminfo.exe
+tst_qsystemmemoryinfo.exe
+tst_qsystemnetworkinfo.exe
+
cd %SAVED_PWD%
diff --git a/bin/rununittests.sh b/bin/rununittests.sh
index 03b3e9d947..61cf217d9c 100755
--- a/bin/rununittests.sh
+++ b/bin/rununittests.sh
@@ -6,8 +6,15 @@ shell=`readlink -f "$0"`;
shell_path=`dirname $shell`;
SAVED_PWD=$PWD;
-cd $shell_path/../build/tests/Debug/bin
-LD_LIBRARY_PATH=$shell_path/../build/Debug/bin:$LD_LIBRARY_PATH
+if [ ! -d "$shell_path/../build/tests/bin" ]; then
+ echo -e 'Unit tests have not been built.'
+ echo -e 'Please run configure with the -tests switch.'
+ exit
+fi
+cd $shell_path/../build/tests/bin
+
+
+LD_LIBRARY_PATH=$shell_path/../lib:$LD_LIBRARY_PATH
#service framework
./tst_qserviceinterfacedescriptor
@@ -43,5 +50,12 @@ LD_LIBRARY_PATH=$shell_path/../build/Debug/bin:$LD_LIBRARY_PATH
./tst_qsystemreadwritelock
./tst_qsystemreadwritelock_oop
+#QSystemInformation
+./tst_qsystemdeviceinfo
+./tst_qsystemdisplayinfo
+./tst_qsysteminfo
+./tst_qsystemmemoryinfo
+./tst_qsystemnetworkinfo
+
cd $SAVED_PWD
diff --git a/tests/auto/qsystemdeviceinfo/qsystemdeviceinfo.pro b/tests/auto/qsystemdeviceinfo/qsystemdeviceinfo.pro
index c1231779ed..6a70e1ac99 100644
--- a/tests/auto/qsystemdeviceinfo/qsystemdeviceinfo.pro
+++ b/tests/auto/qsystemdeviceinfo/qsystemdeviceinfo.pro
@@ -1,12 +1,9 @@
-SOURCES += tst_qsystemdeviceinfo.cpp
TARGET = tst_qsystemdeviceinfo
CONFIG+=testcase
-QT -= gui
-QT += testlib
-
QT = core network
INCLUDEPATH += ../../../systeminfo
+SOURCES += tst_qsystemdeviceinfo.cpp
include(../../../common.pri)
LIBS += -lQtSystemInfo
diff --git a/tests/auto/qsystemdisplayinfo/qsystemdisplayinfo.pro b/tests/auto/qsystemdisplayinfo/qsystemdisplayinfo.pro
index afbfe3b7d1..1b9f3b1dd3 100644
--- a/tests/auto/qsystemdisplayinfo/qsystemdisplayinfo.pro
+++ b/tests/auto/qsystemdisplayinfo/qsystemdisplayinfo.pro
@@ -1,9 +1,7 @@
-SOURCES += tst_qsystemdisplayinfo.cpp
-HEADERS +=
TARGET = tst_qsystemdisplayinfo
CONFIG+=testcase
-QT += testlib
+SOURCES += tst_qsystemdisplayinfo.cpp
QT = core network gui
INCLUDEPATH += ../../../systeminfo
diff --git a/tests/auto/qsysteminfo/qsysteminfo.pro b/tests/auto/qsysteminfo/qsysteminfo.pro
index eeef71c944..ff2cb67928 100644
--- a/tests/auto/qsysteminfo/qsysteminfo.pro
+++ b/tests/auto/qsysteminfo/qsysteminfo.pro
@@ -1,10 +1,7 @@
-SOURCES += tst_qsysteminfo.cpp
-HEADERS +=
TARGET = tst_qsysteminfo
CONFIG+=testcase
-QT -= gui
-QT += testlib
+SOURCES += tst_qsysteminfo.cpp
QT = core network
INCLUDEPATH += ../../../systeminfo
diff --git a/tests/auto/qsystemmemoryinfo/qsystemmemoryinfo.pro b/tests/auto/qsystemmemoryinfo/qsystemmemoryinfo.pro
index e11e5a7590..a4435d913b 100644
--- a/tests/auto/qsystemmemoryinfo/qsystemmemoryinfo.pro
+++ b/tests/auto/qsystemmemoryinfo/qsystemmemoryinfo.pro
@@ -1,11 +1,9 @@
-SOURCES += tst_qsystemmemoryinfo.cpp
-HEADERS +=
TARGET = tst_qsystemmemoryinfo
CONFIG+=testcase
-QT -= gui
-QT += core network
+QT = core network
+SOURCES += tst_qsystemmemoryinfo.cpp
INCLUDEPATH += ../../../systeminfo
include(../../../common.pri)
diff --git a/tests/auto/qsystemnetworkinfo/qsystemnetworkinfo.pro b/tests/auto/qsystemnetworkinfo/qsystemnetworkinfo.pro
index b45bbcf53d..728ede27ae 100644
--- a/tests/auto/qsystemnetworkinfo/qsystemnetworkinfo.pro
+++ b/tests/auto/qsystemnetworkinfo/qsystemnetworkinfo.pro
@@ -1,10 +1,8 @@
-SOURCES += tst_qsystemnetworkinfo.cpp
-HEADERS +=
TARGET = tst_qsystemnetworkinfo
CONFIG+=testcase
-QT -= gui
QT = core network
+SOURCES += tst_qsystemnetworkinfo.cpp
INCLUDEPATH += ../../../systeminfo