Skip to content

Commit

Permalink
fixed bug in pistache server; default to not running in cloud for tes…
Browse files Browse the repository at this point in the history
…t runner
  • Loading branch information
jpswinski committed Nov 8, 2023
1 parent 8053b18 commit f2fb5bd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 73 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/memory_test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/pistache/PistacheServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ PistacheServer::verb_t PistacheServer::str2verb (const char* str)
const char* PistacheServer::sanitize (const char* filename)
{
const char* safe_filename = StringLib::replace(filename, PATH_DELIMETER_STR, "_");
FString safe_pathname(0, "%s%c%s%c%s.lua", CONFDIR, PATH_DELIMETER, "api", PATH_DELIMETER, safe_filename);
FString safe_pathname("%s%c%s%c%s.lua", CONFDIR, PATH_DELIMETER, "api", PATH_DELIMETER, safe_filename);
delete [] safe_filename;
return safe_pathname.c_str(true);
}
Expand Down
31 changes: 7 additions & 24 deletions scripts/selftests/test_runner.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
local runner = require("test_executive")
local console = require("console")
local global = require("global")
local td = runner.rootdir(arg[0]) -- root directory
local loglvl = global.eval(arg[1]) or core.INFO
local incloud = arg[1] == "cloud"

-- Initial Configuration --
-- console.monitor:config(core.LOG, loglvl)
-- sys.setlvl(core.LOG, loglvl)

local maxRuns = 1
for runNum = 1, maxRuns do

-- Run Core Self Tests --
-- Run Core Self Tests --
if __core__ then
runner.script(td .. "tcp_socket.lua")
runner.script(td .. "udp_socket.lua")
Expand Down Expand Up @@ -63,7 +54,7 @@ if __legacy__ then
end

-- Run ICESat-2 Plugin Self Tests
if __icesat2__ then
if __icesat2__ and incloud then
local icesat2_td = td .. "../../plugins/icesat2/selftests/"
runner.script(icesat2_td .. "plugin_unittest.lua")
runner.script(icesat2_td .. "atl03_reader.lua")
Expand All @@ -75,13 +66,13 @@ if __icesat2__ then
end

-- Run opendata Plugin Self Tests
if __opendata__ then
if __opendata__ and incloud then
local opendata_td = td .. "../../plugins/opendata/selftests/"
runner.script(opendata_td .. "worldcover_reader.lua")
end

-- Run PGC Plugin Self Tests
if __pgc__ then
if __pgc__ and incloud then
local pgc_td = td .. "../../plugins/pgc/selftests/"
runner.script(pgc_td .. "arcticdem_reader.lua")
runner.script(pgc_td .. "temporal_filter_test.lua")
Expand All @@ -95,25 +86,17 @@ if __pgc__ then
end

-- Run Landsat Plugin Self Tests
if __landsat__ then
if __landsat__ and incloud then
local landsat_td = td .. "../../plugins/landsat/selftests/"
runner.script(landsat_td .. "landsat_reader.lua")
end

-- Run usgs3dep Plugin Self Tests
if __usgs3dep__ then
if __usgs3dep__ and incloud then
local usg2dep_td = td .. "../../plugins/usgs3dep/selftests/"
runner.script(usg2dep_td .. "usgs3dep_reader.lua")
end


if maxRuns > 1 then
print(string.format("\n--------------------------------\nTest Repeat Run: %d of %d finished\n--------------------------------", runNum, maxRuns))
sys.wait(3)
end

end -- test repeat loop end

-- Report Results --
local errors = runner.report()

Expand Down
2 changes: 1 addition & 1 deletion targets/slideruleearth-aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ MYIP ?= $(shell (ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$$/\1/p'))
ENVVER = $(shell git --git-dir ../../.git --work-tree ../../.git describe --abbrev --dirty --always --tags --long)
USERCFG ?=

TEST ?= $(ROOT)/scripts/selftests/test_runner.lua
TEST ?= $(ROOT)/scripts/selftests/test_runner.lua cloud
MOSAICS_PERFORMANCE_TEST ?= $(ROOT)/plugins/pgc/systests/arcticdem_mosaic_perf.lua
STRIPS_PERFORMANCE_TEST ?= $(ROOT)/plugins/pgc/systests/arcticdem_strips_perf.lua
SUBSET_PERFORMANCE_TEST ?= $(ROOT)/scripts/systests/subset_perf_test.lua
Expand Down

0 comments on commit f2fb5bd

Please sign in to comment.