Skip to content

Commit

Permalink
Merge pull request #1929 from avancinirodrigo/master
Browse files Browse the repository at this point in the history
Fixing .nc test erros on Windows
  • Loading branch information
pedro-andrade-inpe authored Jul 17, 2017
2 parents 3a9371b + f9ff38a commit ad990b5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
17 changes: 9 additions & 8 deletions ide/zerobrane/terrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ return {
-- path to TerraME
terrame = os.getenv("TME_PATH")
-- hack in Mac OS X
if terrame == nil then
if terrame == nil and ide.osname == "Macintosh" then
terrame = "/Applications/terrame.app/Contents/bin"
end

local fopen = io.open(terrame..executable)
if not fopen then
DisplayOutputLn("Please define 'path.terrame_install' in your cfg/user.lua")
else
fopen:close()
end
DisplayOutputLn("Could not find TME_PATH. Is TerraME installed?")
return
end
end

if not wx.wxDirExists(terrame) then
DisplayOutputLn("Can't find terrame executable in "..terrame)
return
end

wx.wxSetEnv("TME_PATH", terrame)

if rundebug then
Expand Down
3 changes: 2 additions & 1 deletion packages/base/tests/functional/basics/CellularSpace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ return{
layer = gis.Layer{
project = proj,
name = layerName1,
file = filePath1
file = filePath1,
epsg = 4326
}

cs = CellularSpace{
Expand Down
14 changes: 9 additions & 5 deletions packages/gis/tests/nc/basic/Layer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ return {
Layer {
project = proj,
name = layerName1,
file = filePath("test/vegtype_2000.nc", "gis")
file = filePath("test/vegtype_2000.nc", "gis"),
epsg = 4326
}

local filePath1 = "vegtype_cells_nc_basic.shp"
Expand Down Expand Up @@ -78,7 +79,8 @@ return {
local l = Layer {
project = proj,
name = vegType,
file = filePath("test/vegtype_2000.nc", "gis")
file = filePath("test/vegtype_2000.nc", "gis"),
epsg = 4326
}

unitTest:assertEquals(l:representation(), "raster") -- SKIP
Expand All @@ -101,7 +103,8 @@ return {
local l = Layer {
project = proj,
name = vegType,
file = filePath("test/vegtype_2000.nc", "gis")
file = filePath("test/vegtype_2000.nc", "gis"),
epsg = 4326
}

unitTest:assertEquals(l:bands(), 1) -- SKIP
Expand All @@ -125,11 +128,12 @@ return {
local l = Layer {
project = proj,
name = layerName1,
file = filePath("test/vegtype_2000.nc", "gis")
file = filePath("test/vegtype_2000.nc", "gis"),
epsg = 4326
}

unitTest:assertEquals( -- SKIP
tostring(l), [[epsg number [0]
tostring(l), [[epsg number [4326]
file string [vegtype_2000.nc]
name string [Vegtype_layer]
project Project
Expand Down

0 comments on commit ad990b5

Please sign in to comment.