Skip to content

Commit 82ef4d1

Browse files
committed
Applied patch from Etienne to make gzip/zip tests run under linux
1 parent 0b8e113 commit 82ef4d1

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/src/core/testziplayer.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class TestZipLayer: public QObject
7575
void testZipItemAll();
7676
// test that styles are loaded from .qml files outside zip files
7777
void testZipItemVectorTransparency();
78-
void testGipItemVectorTransparency();
78+
void testGZipItemVectorTransparency();
7979
void testZipItemRasterTransparency();
8080
void testGZipItemRasterTransparency();
8181
};
@@ -199,6 +199,8 @@ int TestZipLayer::getLayerTransparency( QString myFileName, QString myProviderKe
199199
myLayer = getZipLayer( myFileName, "" );
200200
if ( myLayer && myLayer->isValid() )
201201
myTransparency = myLayer->getTransparency();
202+
else
203+
QWARN( QString( "Could not open filename %1 using %2 provider" ).arg( myFileName ).arg( myProviderKey ).toLocal8Bit().data() );
202204
if ( myLayer )
203205
delete myLayer;
204206
return myTransparency;
@@ -247,6 +249,9 @@ void TestZipLayer::testPassthruVectorZip()
247249

248250
void TestZipLayer::testPassthruVectorGzip()
249251
{
252+
#if GDAL_VERSION_NUM < 1700
253+
QSKIP( "This test requires GDAL > 1.7", SkipSingle );
254+
#endif
250255
for ( int i = 1 ; i <= mMaxScanZipSetting ; i++ )
251256
{
252257
mSettings.setValue( "/qgis/scanZipInBrowser", i );
@@ -313,15 +318,21 @@ void TestZipLayer::testZipItemAll()
313318

314319
void TestZipLayer::testZipItemVectorTransparency()
315320
{
321+
#if GDAL_VERSION_NUM < 1800
322+
QSKIP( "This test requires GDAL > 1.8", SkipSingle );
323+
#endif
316324
int myTarget = 250;
317325
int myTransparency = getLayerTransparency( mDataDir + "points2.zip", "ogr", 1 );
318326
QVERIFY2(( myTransparency == myTarget ), QString( "Transparency is %1, should be %2" ).arg( myTransparency ).arg( myTarget ).toLocal8Bit().data() );
319327
myTransparency = getLayerTransparency( mDataDir + "points2.zip", "ogr", 2 );
320328
QVERIFY2(( myTransparency == myTarget ), QString( "Transparency is %1, should be %2" ).arg( myTransparency ).arg( myTarget ).toLocal8Bit().data() );
321329
}
322330

323-
void TestZipLayer::testGipItemVectorTransparency()
331+
void TestZipLayer::testGZipItemVectorTransparency()
324332
{
333+
#if GDAL_VERSION_NUM < 1700
334+
QSKIP( "This test requires GDAL > 1.7", SkipSingle );
335+
#endif
325336
int myTarget = 250;
326337
int myTransparency = getLayerTransparency( mDataDir + "points3.geojson.gz", "ogr", 1 );
327338
QVERIFY2(( myTransparency == myTarget ), QString( "Transparency is %1, should be %2" ).arg( myTransparency ).arg( myTarget ).toLocal8Bit().data() );

0 commit comments

Comments
 (0)