diff options
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 11 |
1 files changed, 6 insertions, 5 deletions
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 | |||
763 | 763 | ||
764 | --print(dumpTable(options.tests.value, "", "tests")) | 764 | --print(dumpTable(options.tests.value, "", "tests")) |
765 | 765 | ||
766 | execute("mkdir -p results") | ||
767 | 766 | ||
768 | if 0 < #arg then | 767 | if 0 < #arg then |
769 | if "/" == arg[1]:sub(-1, -1) then | 768 | if "/" == arg[1]:sub(-1, -1) then |
@@ -815,8 +814,7 @@ if 0 < #arg then | |||
815 | else | 814 | else |
816 | checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) | 815 | checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) |
817 | end | 816 | end |
818 | logPost() | 817 | |
819 | logFile:close() | ||
820 | local f = pu.host | 818 | local f = pu.host |
821 | if "" ~= ip then f = f .. "_" .. ip end | 819 | if "" ~= ip then f = f .. "_" .. ip end |
822 | local rfile, e = io.open("results/" .. f .. ".lua", "w+") | 820 | local rfile, e = io.open("results/" .. f .. ".lua", "w+") |
@@ -824,6 +822,8 @@ if 0 < #arg then | |||
824 | rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n") | 822 | rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n") |
825 | rfile:close() | 823 | rfile:close() |
826 | end | 824 | end |
825 | logPost() | ||
826 | logFile:close() | ||
827 | else | 827 | else |
828 | if not keep then | 828 | if not keep then |
829 | os.execute("rm -f results/*.log") | 829 | os.execute("rm -f results/*.log") |
@@ -835,7 +835,7 @@ else | |||
835 | if nil == logFile then C("opening log file - " .. e); return end | 835 | if nil == logFile then C("opening log file - " .. e); return end |
836 | logPre() | 836 | logPre() |
837 | I("Starting tests " .. table.concat(options.tests.value, ", ")) | 837 | I("Starting tests " .. table.concat(options.tests.value, ", ")) |
838 | execute("mkdir -p results") | 838 | os.execute("mkdir -p results") |
839 | mirrors = getMirrors() | 839 | mirrors = getMirrors() |
840 | checkHost(options.referenceSite.value) | 840 | checkHost(options.referenceSite.value) |
841 | for k, m in pairs(mirrors) do | 841 | for k, m in pairs(mirrors) do |
@@ -870,7 +870,8 @@ else | |||
870 | execute("./" .. report .. " ") | 870 | execute("./" .. report .. " ") |
871 | end | 871 | end |
872 | end | 872 | end |
873 | |||
874 | -- os.execute("rm -f results/*.lua") | ||
873 | logPost() | 875 | logPost() |
874 | os.execute("rm -f results/*.lua") | ||
875 | logFile:close() | 876 | logFile:close() |
876 | end | 877 | end |