diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-04-05 13:16:12 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-04-05 13:16:12 +0200 |
commit | 33601a7bae426afca8bcb40e7157befd7b57adf6 (patch) | |
tree | 3edc920dfb83d655133c53355b90d177c494deee | |
parent | 134cbc12a3e19bdbc3fc1f8aa61e96ca4a24ff82 (diff) | |
download | drminfo-33601a7bae426afca8bcb40e7157befd7b57adf6.tar.gz |
tests: some tweaks
-rw-r--r-- | tests/basic.py | 2 | ||||
-rw-r--r-- | tests/drminfo/__init__.py | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/basic.py b/tests/basic.py index 9999c3a..7ff8ef6 100644 --- a/tests/basic.py +++ b/tests/basic.py @@ -30,7 +30,7 @@ class BaseDRM(TestDRM): "800x600", "1024x768", "1280x800", - "1280x1024", + "1600x900", "1920x1080", ] diff --git a/tests/drminfo/__init__.py b/tests/drminfo/__init__.py index d586e61..e7a2436 100644 --- a/tests/drminfo/__init__.py +++ b/tests/drminfo/__init__.py @@ -156,6 +156,12 @@ class TestDRM(avocado.Test): output += msg return output + def html_append(self, html): + outfile = '%s/view.html' % self.outputdir + f = open(outfile, "a") + f.write(html) + f.close() + def screen_dump(self, vga, name, expected = None): if vga == 'qxl-vga' or vga == 'qxl': self.vm.qmp('screendump', filename = '/dev/null'); @@ -174,12 +180,18 @@ class TestDRM(avocado.Test): if os.path.isfile("/usr/bin/convert"): run("/usr/bin/convert %s %s" % (out_ppm, out_jpg)) os.remove(out_ppm) + img = "<h3>%s-%s</h3>\n" % (name, vga) + img += "<img src='%s-%s.jpg'>\n" % (name, vga) + self.html_append(img) def write_text(self, vga, name, content): outfile = '%s/%s-%s.txt' % (self.outputdir, name, vga) f = open(outfile, "w") f.write(content) f.close() + div = "<h3>%s-%s</h3>\n" % (name, vga) + div += "<pre>%s</pre>" % content + self.html_append(div) def setUp(self): self.jobdir = os.path.dirname(self.workdir) |