def ogr_pgeo_main(): # Run with the PGeo driver only (MDB disabled) gdaltest.run_tests( [ ogr_pgeo_1 ] ) gdaltest.run_tests( gdaltest_list_internal ) # Run with the MDB driver only (PGeo disabled) gdaltest.run_tests( [ ogr_pgeo_mdb_1 ] ) gdaltest.run_tests( gdaltest_list_internal ) return 'success'
# Just a few for spill file, and compressed support. short_list = [ \ ('byte.tif', 1, 4672, None), ('uint16.tif', 1, 4672, None), ('float64.tif', 1, 4672, None) ] for item in short_list: ut2 = gdaltest.GDALTest( 'HFA', item[0], item[1], item[2], options = [ 'USE_SPILL=YES' ] ) if ut2 is None: print( 'HFA tests skipped' ) gdaltest_list.append( (ut2.testCreateCopy, item[0] + ' (spill)') ) gdaltest_list.append( (ut2.testCreate, item[0] + ' (spill)') ) ut2 = gdaltest.GDALTest( 'HFA', item[0], item[1], item[2], options = [ 'COMPRESS=YES' ] ) if ut2 is None: print( 'HFA tests skipped' ) # gdaltest_list.append( (ut2.testCreateCopy, item[0] + ' (compressed)') ) gdaltest_list.append( (ut2.testCreate, item[0] + ' (compressed)') ) if __name__ == '__main__': gdaltest.setup_run( 'hfa_write' ) gdaltest.run_tests( gdaltest_list ) gdaltest.summarize()
return 'success' ############################################################################### def vsis3_cleanup(): for var in gdaltest.aws_vars: gdal.SetConfigOption(var, gdaltest.aws_vars[var]) return 'success' gdaltest_list = [ vsis3_init, vsis3_1, vsis3_start_webserver, vsis3_2, vsis3_3, vsis3_4, vsis3_5, vsis3_6, vsis3_stop_webserver, vsis3_cleanup ] gdaltest_list_extra = [ vsis3_extra_1, vsis3_cleanup ] if __name__ == '__main__': gdaltest.setup_run( 'vsis3' ) gdaltest.run_tests( gdaltest_list + gdaltest_list_extra ) gdaltest.summarize()
def ogr_fgdb_stress_test_cleanup(): if ogrtest.fgdb_drv is None: return 'skip' try: shutil.rmtree("tmp/test.gdb") except OSError: pass gdal.Unlink("tmp/test." + ogrtest.reference_ext) return 'success' # Do nothing in whole run of the suite gdaltest_list = [] explicit_gdaltest_list = [ogr_fgdb_stress_test_init, ogr_fgdb_stress_test_1, ogr_fgdb_stress_test_2, ogr_fgdb_stress_test_cleanup] if __name__ == '__main__': gdaltest.setup_run('ogr_fgdb_stress_test') gdaltest.run_tests(explicit_gdaltest_list) gdaltest.summarize()
if gdaltest.dods_ds is None: return 'skip' gdaltest.dods_profiles = None gdaltest.dods_lines = None gdaltest.dods_normalized = None gdaltest.dods_ds.Destroy() gdaltest.dods_ds = None return 'success' gdaltest_list = [] manual_gdaltest_list = [ ogr_dods_1, ogr_dods_2, ogr_dods_3, ogr_dods_4, ogr_dods_5, ogr_dods_cleanup] if __name__ == '__main__': gdaltest.setup_run('ogr_dods') gdaltest.run_tests(manual_gdaltest_list) gdaltest.summarize()
return 'success' gdaltest_list = [vsiswift_init, vsiswift_real_server_errors, vsiswift_start_webserver, vsiswift_fake_auth_v1_url, vsiswift_fake_auth_storage_url_and_auth_token, vsiswift_stat, vsiswift_fake_readdir, vsiswift_fake_write, vsiswift_fake_unlink, vsiswift_fake_mkdir_rmdir, vsiswift_stop_webserver, vsiswift_cleanup] # gdaltest_list = [ vsiswift_init, vsiswift_start_webserver, vsiswift_fake_mkdir_rmdir, vsiswift_stop_webserver, vsiswift_cleanup ] gdaltest_list_extra = [vsiswift_extra_1] if __name__ == '__main__': gdaltest.setup_run('vsiswift') if gdal.GetConfigOption('RUN_MANUAL_ONLY', None): gdaltest.run_tests(gdaltest_list_extra) else: gdaltest.run_tests(gdaltest_list + gdaltest_list_extra + [vsiswift_cleanup]) sys.exit(gdaltest.summarize())
osr_proj4_16, osr_proj4_17, osr_proj4_18, osr_proj4_19, osr_proj4_20, osr_proj4_21, osr_proj4_22, osr_proj4_23, osr_proj4_24, osr_proj4_25, osr_proj4_26, osr_proj4_27, osr_proj4_28, osr_proj4_28_missing_proj_epsg_dict, osr_proj4_error_cases_export_mercator, ] if __name__ == '__main__': if len(sys.argv) == 2 and sys.argv[1] == "osr_proj4_28": os.putenv('PROJ_LIB', '/i/dont_exist') gdaltest.run_tests([osr_proj4_28]) sys.exit(0) gdaltest.setup_run('osr_proj4') gdaltest.run_tests(gdaltest_list) gdaltest.summarize()
for var in gdaltest.webhdfs_vars: gdal.SetConfigOption(var, gdaltest.webhdfs_vars[var]) return 'success' gdaltest_list = [vsiwebhdfs_init, vsiwebhdfs_start_webserver, vsiwebhdfs_open, vsiwebhdfs_stat, vsiwebhdfs_readdir, vsiwebhdfs_write, vsiwebhdfs_unlink, vsiwebhdfs_mkdir_rmdir, vsiwebhdfs_stop_webserver, vsiwebhdfs_cleanup] gdaltest_list_extra = [vsiwebhdfs_extra_1] if __name__ == '__main__': gdaltest.setup_run('vsiwebhdfs') if gdal.GetConfigOption('RUN_MANUAL_ONLY', None): gdaltest.run_tests(gdaltest_list_extra) else: gdaltest.run_tests( gdaltest_list + gdaltest_list_extra + [vsiwebhdfs_cleanup]) sys.exit(gdaltest.summarize())
'/vsimem/rasterio_16.asc', options='-of AAIGRID -r mode -outsize 50% 50%') cs = ds.GetRasterBand(1).Checksum() if cs != 15: gdaltest.post_reason('fail') print(cs) print(ds.ReadAsArray()) return 'fail' gdal.Unlink('/vsimem/rasterio_16.asc') gdal.Unlink('/vsimem/rasterio_16_out.asc') return 'success' gdaltest_list = [ rasterio_1, rasterio_2, rasterio_3, rasterio_4, rasterio_5, rasterio_6, rasterio_7, rasterio_8, rasterio_9, rasterio_10, rasterio_11, rasterio_12, rasterio_13, rasterio_14, rasterio_15, rasterio_16 ] #gdaltest_list = [ rasterio_16 ] if __name__ == '__main__': gdaltest.setup_run('rasterio') gdaltest.run_tests(gdaltest_list) gdaltest.summarize()
gdal.SetConfigOption(var, gdaltest.gs_vars[var]) return 'success' gdaltest_list = [ vsigs_init, vsigs_1, vsigs_start_webserver, vsigs_2, vsigs_3, vsigs_read_credentials_refresh_token_default_gdal_app, vsigs_read_credentials_refresh_token_custom_app, vsigs_read_credentials_oauth2_service_account, vsigs_read_credentials_file, vsigs_read_credentials_file_refresh_token, vsigs_read_credentials_gce, vsigs_read_credentials_gce_expiration, vsigs_stop_webserver, vsigs_cleanup ] # gdaltest_list = [ vsigs_init, vsigs_start_webserver, vsigs_2, vsigs_read_credentials_oauth2_service_account, vsigs_stop_webserver, vsigs_cleanup ] gdaltest_list_extra = [ vsigs_extra_1, vsigs_cleanup ] if __name__ == '__main__': gdaltest.setup_run( 'vsigs' ) gdaltest.run_tests( gdaltest_list + gdaltest_list_extra ) gdaltest.summarize()
for var in gdaltest.swift_vars: gdal.SetConfigOption(var, gdaltest.swift_vars[var]) return 'success' gdaltest_list = [ vsiswift_init, vsiswift_real_server_errors, vsiswift_start_webserver, vsiswift_fake_auth_v1_url, vsiswift_fake_auth_storage_url_and_auth_token, vsiswift_stat, vsiswift_fake_readdir, vsiswift_fake_write, vsiswift_fake_unlink, vsiswift_fake_mkdir_rmdir, vsiswift_stop_webserver, vsiswift_cleanup ] # gdaltest_list = [ vsiswift_init, vsiswift_start_webserver, vsiswift_fake_mkdir_rmdir, vsiswift_stop_webserver, vsiswift_cleanup ] gdaltest_list_extra = [vsiswift_extra_1] if __name__ == '__main__': gdaltest.setup_run('vsiswift') if gdal.GetConfigOption('RUN_MANUAL_ONLY', None): gdaltest.run_tests(gdaltest_list_extra) else: gdaltest.run_tests(gdaltest_list + gdaltest_list_extra + [vsiswift_cleanup]) sys.exit(gdaltest.summarize())
return 'success' ############################################################################### # Cleanup def dods_cleanup(): if gdaltest.dods_dr is None: return 'skip' gdaltest.dods_dr = None gdaltest.dods_grid_ds = None return 'success' gdaltest_list = [] manual_gdaltest_list = [ dods_1, dods_2, dods_3, dods_4, dods_5, dods_6, dods_cleanup ] if __name__ == '__main__': gdaltest.setup_run('dods') gdaltest.run_tests(manual_gdaltest_list) gdaltest.summarize()
def ogr_fgdb_stress_test_cleanup(): if ogrtest.fgdb_drv is None: return 'skip' try: shutil.rmtree("tmp/test.gdb") except OSError: pass gdal.Unlink("tmp/test." + ogrtest.reference_ext) return 'success' # Do nothing in whole run of the suite gdaltest_list = [] explicit_gdaltest_list = [ ogr_fgdb_stress_test_init, ogr_fgdb_stress_test_1, ogr_fgdb_stress_test_2, ogr_fgdb_stress_test_cleanup ] if __name__ == '__main__': gdaltest.setup_run('ogr_fgdb_stress_test') gdaltest.run_tests(explicit_gdaltest_list) sys.exit(gdaltest.summarize())