From 7f2a78e5cdc27aa048b927efa6c3c2d66971b7d0 Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 26 Nov 2019 00:51:33 +1000 Subject: Minor cleanups. --- apt-panopticon.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apt-panopticon.lua') diff --git a/apt-panopticon.lua b/apt-panopticon.lua index f2eca59..a3857b3 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -763,7 +763,6 @@ end --print(dumpTable(options.tests.value, "", "tests")) -execute("mkdir -p results") if 0 < #arg then if "/" == arg[1]:sub(-1, -1) then @@ -815,8 +814,7 @@ if 0 < #arg then else checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) end - logPost() - logFile:close() + local f = pu.host if "" ~= ip then f = f .. "_" .. ip end local rfile, e = io.open("results/" .. f .. ".lua", "w+") @@ -824,6 +822,8 @@ if 0 < #arg then rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n") rfile:close() end + logPost() + logFile:close() else if not keep then os.execute("rm -f results/*.log") @@ -835,7 +835,7 @@ else if nil == logFile then C("opening log file - " .. e); return end logPre() I("Starting tests " .. table.concat(options.tests.value, ", ")) - execute("mkdir -p results") + os.execute("mkdir -p results") mirrors = getMirrors() checkHost(options.referenceSite.value) for k, m in pairs(mirrors) do @@ -870,7 +870,8 @@ else execute("./" .. report .. " ") end end + +-- os.execute("rm -f results/*.lua") logPost() - os.execute("rm -f results/*.lua") logFile:close() end -- cgit v1.1