Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testfx.lua')
-rw-r--r--tests/testfx.lua34
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/testfx.lua b/tests/testfx.lua
index 89fa64c..f235cd0 100644
--- a/tests/testfx.lua
+++ b/tests/testfx.lua
@@ -228,30 +228,32 @@
local numpassed = 0
local numfailed = 0
-
+ local start_time = os.clock()
for suitename, suitetests in pairs(T) do
for testname, testfunc in pairs(suitetests) do
+
+ if suitetests.setup ~= testfunc and suitetests.teardown ~= testfunc then
+ local ok, err = test_setup(suitetests, testfunc)
- local ok, err = test_setup(suitetests, testfunc)
-
- if ok then
- ok, err = test_run(suitetests, testfunc)
- end
+ if ok then
+ ok, err = test_run(suitetests, testfunc)
+ end
- local tok, terr = test_teardown(suitetests, testfunc)
- ok = ok and tok
- err = err or tok
+ local tok, terr = test_teardown(suitetests, testfunc)
+ ok = ok and tok
+ err = err or tok
- if (not ok) then
- test.print(string.format("%s.%s: %s", suitename, testname, err))
- numfailed = numfailed + 1
- else
- numpassed = numpassed + 1
+ if (not ok) then
+ test.print(string.format("%s.%s: %s", suitename, testname, err))
+ numfailed = numfailed + 1
+ else
+ numpassed = numpassed + 1
+ end
end
-
+
end
end
-
+ io.write('running time : ', os.clock() - start_time,'\n')
print = test.print
return numpassed, numfailed
end