Skip to content

Commit

Permalink
test fixes:
Browse files Browse the repository at this point in the history
- run xvfb in 96 dpi mode
- indentation update (including tests)
- fix running tests from build directory
  • Loading branch information
jef-n committed Apr 21, 2012
1 parent d9bc7f3 commit 8e75d4b
Show file tree
Hide file tree
Showing 26 changed files with 1,058 additions and 1,031 deletions.
8 changes: 7 additions & 1 deletion debian/rules
Expand Up @@ -19,6 +19,12 @@ endif

DEB_BUILD_NAME ?= $(DISTRIBUTION)-$(DEB_BUILD_ARCH)

ifeq (,$(DISPLAY))
TESTMAKE=xvfb-run -a -n 1 -s "-screen 0 1280x1024x24 -dpi 96" $(MAKE)
else
TESTMAKE=$(MAKE)
endif

QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/p' CMakeLists.txt)
QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/p' CMakeLists.txt)
QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/p' CMakeLists.txt)
Expand Down Expand Up @@ -113,7 +119,7 @@ build-stamp: debian/build/CMakeCache.txt

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Code to run the package test suite - and ignore the outcome for now
LD_LIBRARY_PATH=$(PWD)/debian/build/output/lib:$(LD_LIBRARY_PATH) xvfb-run -a -n 1 -s "-screen 0 1280x1024x24" $(MAKE) -C debian/build $(DEB_TEST_TARGET) || true
LD_LIBRARY_PATH=$(PWD)/debian/build/output/lib:$(LD_LIBRARY_PATH) $(TESTMAKE) -C debian/build $(DEB_TEST_TARGET) || true
else
echo Skipping tests.
endif
Expand Down
2 changes: 1 addition & 1 deletion scripts/astyle-all.sh
Expand Up @@ -6,7 +6,7 @@ set -e

export elcr="$(tput el)$(tput cr)"

find src -type f -print | while read f; do
find src tests -type f -print | while read f; do
case "$f" in
src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
echo $f skipped
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisapp.h
Expand Up @@ -1201,8 +1201,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QString mOldScale;

#ifdef HAVE_TOUCH
bool gestureEvent(QGestureEvent *event);
void tapAndHoldTriggered(QTapAndHoldGesture *gesture);
bool gestureEvent( QGestureEvent *event );
void tapAndHoldTriggered( QTapAndHoldGesture *gesture );
#endif
};

Expand Down
8 changes: 8 additions & 0 deletions src/core/qgis.cpp
Expand Up @@ -22,6 +22,8 @@

#include "qgsconfig.h"

#include <ogr_api.h>

// Version constants
//

Expand All @@ -38,6 +40,12 @@ const int QGis::QGIS_VERSION_INT = VERSION_INT;
// Release name
const char* QGis::QGIS_RELEASE_NAME = RELEASE_NAME;

#if GDAL_VERSION_NUM > 1800
const QString GEOPROJ4 = "+proj=longlat +datum=WGS84 +no_defs";
#else
const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
#endif

const char* QGis::qgisVectorGeometryType[] =
{
"Point",
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgis.h
Expand Up @@ -136,7 +136,7 @@ inline bool doubleNear( double a, double b, double epsilon = 4 * DBL_EPSILON )
/** Wkt string that represents a geographic coord sys
* @note added in 1.8 to replace GEOWkt
*/
const QString GEOWKT =
const QString GEOWKT =
"GEOGCS[\"WGS 84\", "
" DATUM[\"WGS_1984\", "
" SPHEROID[\"WGS 84\",6378137,298.257223563, "
Expand All @@ -157,7 +157,7 @@ Q_DECL_DEPRECATED
#endif
const QString GEOWkt = GEOWKT;
/** PROJ4 string that represents a geographic coord sys */
const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
extern const QString GEOPROJ4;
/** Magic number for a geographic coord sys in POSTGIS SRID */
const long GEOSRID = 4326;
/** Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id */
Expand Down
80 changes: 40 additions & 40 deletions src/core/qgsdatasourceuri.cpp
Expand Up @@ -530,47 +530,47 @@ QString QgsDataSourceURI::uri() const
{
theUri += " type=";

switch( mWkbType )
switch ( mWkbType )
{
case QGis::WKBPoint:
theUri += "POINT";
break;
case QGis::WKBLineString:
theUri += "LINESTRING";
break;
case QGis::WKBPolygon:
theUri += "POLYGON";
break;
case QGis::WKBMultiPoint:
theUri += "MULTIPOINT";
break;
case QGis::WKBMultiLineString:
theUri += "MULTILINESTRING";
break;
case QGis::WKBMultiPolygon:
theUri += "MULTIPOLYGON";
break;
case QGis::WKBPoint25D:
theUri += "POINTM";
break;
case QGis::WKBLineString25D:
theUri += "LINESTRINGM";
break;
case QGis::WKBPolygon25D:
theUri += "POLYGONM";
break;
case QGis::WKBMultiPoint25D:
theUri += "MULTIPOINTM";
break;
case QGis::WKBMultiLineString25D:
theUri += "MULTILINESTRINGM";
break;
case QGis::WKBMultiPolygon25D:
theUri += "MULTIPOLYGONM";
break;
case QGis::WKBUnknown:
case QGis::WKBNoGeometry:
break;
case QGis::WKBPoint:
theUri += "POINT";
break;
case QGis::WKBLineString:
theUri += "LINESTRING";
break;
case QGis::WKBPolygon:
theUri += "POLYGON";
break;
case QGis::WKBMultiPoint:
theUri += "MULTIPOINT";
break;
case QGis::WKBMultiLineString:
theUri += "MULTILINESTRING";
break;
case QGis::WKBMultiPolygon:
theUri += "MULTIPOLYGON";
break;
case QGis::WKBPoint25D:
theUri += "POINTM";
break;
case QGis::WKBLineString25D:
theUri += "LINESTRINGM";
break;
case QGis::WKBPolygon25D:
theUri += "POLYGONM";
break;
case QGis::WKBMultiPoint25D:
theUri += "MULTIPOINTM";
break;
case QGis::WKBMultiLineString25D:
theUri += "MULTILINESTRINGM";
break;
case QGis::WKBMultiPolygon25D:
theUri += "MULTIPOLYGONM";
break;
case QGis::WKBUnknown:
case QGis::WKBNoGeometry:
break;
}
}

Expand Down

0 comments on commit 8e75d4b

Please sign in to comment.