mirror of
https://github.com/love2d/love.git
synced 2026-08-12 00:20:52 +02:00
fix xml format
This commit is contained in:
@@ -205,6 +205,14 @@ jobs:
|
||||
with:
|
||||
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg
|
||||
path: pdb/Release/*.pdb
|
||||
- name: Run All Tests
|
||||
run: build/love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}.exe testing --runAllTests
|
||||
- name: Test Report
|
||||
uses: dorny/test-reporter@v1
|
||||
with:
|
||||
name: Test Output
|
||||
path: testing/output/*.xml
|
||||
reporter: jest-junit
|
||||
macOS:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
|
||||
@@ -309,14 +309,15 @@ TestMethod = {
|
||||
output = self.result.key .. ' ' .. self.result.message
|
||||
end
|
||||
if output == '' and self.skipped == true then
|
||||
failure = '\t\t\t<skipped message="' .. self.skipreason .. '></skipped>'
|
||||
output = self.skipreason
|
||||
end
|
||||
|
||||
-- append XML for the test class result
|
||||
self.testmodule.xml = self.testmodule.xml .. '\t\t<testclass classname="' ..
|
||||
self.method .. '" name="' .. self.method ..
|
||||
self.testmodule.xml = self.testmodule.xml .. '\t\t<testcase classname="' ..
|
||||
self.method .. '" name="' .. self.method .. '" assertions="' .. tostring(#self.asserts) ..
|
||||
'" time="' .. endtime .. '">\n' ..
|
||||
failure .. '\t\t</testclass>\n'
|
||||
failure .. '\t\t</testcase>\n'
|
||||
|
||||
-- unused currently, adds a preview image for certain graphics methods to the output
|
||||
local preview = ''
|
||||
|
||||
@@ -145,8 +145,6 @@ TestSuite = {
|
||||
|
||||
-- @TODO use mountFullPath to write output to src?
|
||||
love.filesystem.mountFullPath(love.filesystem.getSource() .. "/output", "tempoutput", "readwrite")
|
||||
love.filesystem.remove('tempoutput/' .. self.output .. '.xml')
|
||||
love.filesystem.remove('tempoutput/' .. self.output .. '.html')
|
||||
love.filesystem.write('tempoutput/' .. self.output .. '.xml', xml .. self.xml .. '</testsuites>')
|
||||
love.filesystem.write('tempoutput/' .. self.output .. '.html', html .. self.html .. '</div></body></html>')
|
||||
|
||||
|
||||
+6
-14
@@ -6,20 +6,12 @@
|
||||
- finish graphics state methods
|
||||
- start graphics drawing methods
|
||||
- start object methods
|
||||
- look into XML reader github actions to display results in readme?
|
||||
dorny/test-reporter@v1.6.0 seems to do it
|
||||
would need to run the tests first then could use it like:
|
||||
|
||||
- name: Run Tests
|
||||
- run: PATH_TO_BUILT_APP ./testing --runAllTests
|
||||
- name: Test Report
|
||||
uses: dorny/test-reporter@v1
|
||||
with:
|
||||
name: Test Output
|
||||
path: output/*.xml
|
||||
reporter: jest-junit
|
||||
|
||||
and d. check format: https://github.com/testmoapp/junitxml
|
||||
- some joystick/input stuff could be at least nil checked maybe?
|
||||
- add test run for linux, windows, + ios builds
|
||||
- pass in err string returns to the test output
|
||||
maybe even assertNotNil could use the second value automatically
|
||||
test:assertNotNil(love.filesystem.openFile('file2', 'r')) wouldn't have to change
|
||||
|
||||
|
||||
- need a platform: format table somewhere for compressed formats (i.e. DXT not supported)
|
||||
could add platform as global to command and then use in tests?
|
||||
|
||||
Reference in New Issue
Block a user