Browse Source

add renderer to report md

ell 1 year ago
parent
commit
038b36a67d
3 changed files with 8 additions and 4 deletions
  1. 5 1
      testing/classes/TestSuite.lua
  2. 2 2
      testing/readme.md
  3. 1 1
      testing/tests/graphics.lua

+ 5 - 1
testing/classes/TestSuite.lua

@@ -136,6 +136,8 @@ TestSuite = {
   -- @return {nil}
   printResult = function(self)
     local finaltime = UtilTimeFormat(self.time)
+
+    local name, version, vendor, device = love.graphics.getRendererInfo()
     
     local md = '<!-- PASSED ' .. tostring(self.totals[1]) ..
       ' || FAILED ' .. tostring(self.totals[2]) ..
@@ -145,7 +147,9 @@ TestSuite = {
       finaltime .. 's** with **' ..
       tostring(self.totals[1]) .. '** passed, **' ..
       tostring(self.totals[2]) .. '** failed, and **' ..
-      tostring(self.totals[3]) .. '** skipped\n\n### Report\n' ..
+      tostring(self.totals[3]) .. '** skipped\n\n' .. 
+      'Renderer: ' .. name .. ' | ' .. version .. ' | ' .. vendor .. ' | ' .. device .. '\n\n' ..
+      '### Report\n' ..
       '| Module                | Pass | Fail | Skip | Time   |\n' ..
       '| --------------------- | ------ | ------ | ------- | ------ |\n' ..
       self.mdrows .. '\n\n### Failures\n' .. self.mdfailures

+ 2 - 2
testing/readme.md

@@ -61,7 +61,7 @@ All results will be printed in the console per method as PASS, FAIL, or SKIP wit
 When finished, the following files will be generated in the `/output` directory with a summary of the test results:
 - an `XML` file in the style of [JUnit XML](https://www.ibm.com/docs/en/developer-for-zos/14.1?topic=formats-junit-xml-format)
 - a `HTML` file that shows any visual test results
-- a `Markdown` file for use with [this github action](https://github.com/ellraiser/love-test-report)
+- a `Markdown` file you can use with [this github action](https://github.com/ellraiser/love-test-report)
 > An example of all types of output can be found in the `/examples`  
 > The visual results of any graphic tests can be found in `/output/actual`
 
@@ -124,7 +124,7 @@ Things still left to do:
 
 ## Future Goals
 - [ ] graphics.isCompressed should have an example of all compressed files love can take
-- [ ] Tests can compare visual results to a reference image
+- [ ] Tests can compare visual results to a reference image  
       This is partially done as we already save actual images for graphics tests to
       use in the report output comparisons, so we just need to add a helper method
       to the test class to let you just do assertMatching on the imgdata

+ 1 - 1
testing/tests/graphics.lua

@@ -307,7 +307,7 @@ love.test.graphics.Shader = function(test)
     extern float overwrite;
     vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { 
       vec4 texcol = Texel(tex, texture_coords); 
-      if (overwrite == 1) {
+      if (overwrite == 1.0) {
         return col;
       } else {
         return texcol * color;