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:
authorLiam Devine <dmail00@gmail.com>2011-05-01 01:29:54 +0400
committerLiam Devine <dmail00@gmail.com>2011-05-01 01:29:54 +0400
commit8a38d5adee96bb42d8af3c6c28cfb0cd2fb7711f (patch)
tree7d1c8e59f203c94eafda44da1eb025fd2be714c8 /tests/testfx.lua
parentf740fc5e207c12d4012760446952beb3bf9ad1d2 (diff)
corrected teardown function name in testing_make_linking.lua
stopped 'runall' from running 'setup' and 'teardown' as tests which also stops the inflated test count that I noticed. Added writing of runtime to io for test suites. Added prj = premake.solution.getproject(sln, 1) to vs10 tests and removed the managed flag hack.
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