All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [QA][PATCH 1/7] manual tests migrate to selftest
Date: Mon, 22 Apr 2019 06:41:53 -0600	[thread overview]
Message-ID: <1555936919-19078-2-git-send-email-akuster808@gmail.com> (raw)
In-Reply-To: <1555936919-19078-1-git-send-email-akuster808@gmail.com>

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/lib/oeqa/selftest/cases/oescripts.py | 89 +++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index bcdc2d5..36074c9 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -1,8 +1,11 @@
+import os, sys
 from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator.depends import OETestDepends
 from oeqa.selftest.cases.buildhistory import BuildhistoryBase
 from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
 from oeqa.core.decorator.oeid import OETestID
 
+
 class BuildhistoryDiffTests(BuildhistoryBase):
 
     @OETestID(295)
@@ -26,3 +29,89 @@ class BuildhistoryDiffTests(BuildhistoryBase):
                 self.fail('Unexpected line:\n%s\nExpected line endings:\n  %s' % (line, '\n  '.join(expected_endlines)))
         if expected_endlines:
             self.fail('Missing expected line endings:\n  %s' % '\n  '.join(expected_endlines))
+
+
+class OEScriptTests(OESelftestTestCase):
+    def check_endlines(self, results,  expected_endlines): 
+        for line in results.output.splitlines():
+            for el in expected_endlines:
+                if line == el:
+                    expected_endlines.remove(el)
+                    break
+
+        if expected_endlines:
+            self.fail('Missing expected line endings:\n  %s' % '\n  '.join(expected_endlines))
+
+
+class OEPybootchartguyTests(OEScriptTests):
+    def test_pybootchartguy_help(self):
+        runCmd('../scripts/pybootchartgui/pybootchartgui.py  --help')
+
+    def test_pybootchartguy_to_generate_build_png_output(self):
+        tmpdir = get_bb_var('TMPDIR')
+        runCmd('../scripts/pybootchartgui/pybootchartgui.py  %s/buildstats -o %s/charts -f png' % (tmpdir, tmpdir))
+
+    def test_pybootchartguy_to_generate_build_svg_output(self):
+        tmpdir = get_bb_var('TMPDIR')
+        runCmd('../scripts/pybootchartgui/pybootchartgui.py  %s/buildstats -o %s/charts -f svg' % (tmpdir, tmpdir))
+
+    def test_pybootchartguy_to_generate_build_pdf_output(self):
+        tmpdir = get_bb_var('TMPDIR')
+        runCmd('../scripts/pybootchartgui/pybootchartgui.py  %s/buildstats -o %s/charts -f pdf' % (tmpdir, tmpdir))
+
+
+class OEListPackageconfigTests(OEScriptTests):
+    #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags
+    def test_packageconfig_flags_help(self):
+        runCmd('../scripts/contrib/list-packageconfig-flags.py -h')
+
+    def test_packageconfig_flags_default(self):
+        results = runCmd('../scripts/contrib/list-packageconfig-flags.py')
+        expected_endlines = []
+        expected_endlines.append("RECIPE NAME                                                                    PACKAGECONFIG FLAGS")
+        expected_endlines.append("xserver-xorg-1.20.3                                                            dri dri2 dri3 gcrypt glamor glx nettle openssl systemd systemd-logind udev unwind xinerama xmlto xshmfence xwayland")
+        expected_endlines.append("znc-1.7.1                                                                      ipv6")
+
+        self.check_endlines(results, expected_endlines)
+
+
+    def test_packageconfig_flags_option_flags(self):
+        results = runCmd('../scripts/contrib/list-packageconfig-flags.py -f')
+        expected_endlines = []
+        expected_endlines.append("PACKAGECONFIG FLAG     RECIPE NAMES")
+        expected_endlines.append("xshmfence              xserver-xorg-1.20.3")
+
+        self.check_endlines(results, expected_endlines)
+
+    def test_packageconfig_flags_option_all(self):
+        results = runCmd('../scripts/contrib/list-packageconfig-flags.py -a')
+        expected_endlines = []
+        expected_endlines.append("xserver-xorg-1.20.3")
+        expected_endlines.append("PACKAGECONFIG dri2 udev openssl")
+        expected_endlines.append("PACKAGECONFIG[udev] --enable-config-udev,--disable-config-udev,udev")
+        expected_endlines.append("PACKAGECONFIG[dri] --enable-dri,--disable-dri,xorgproto virtual/mesa")
+        expected_endlines.append("PACKAGECONFIG[dri2] --enable-dri2,--disable-dri2,xorgproto")
+        expected_endlines.append("PACKAGECONFIG[dri3] --enable-dri3,--disable-dri3,xorgproto")
+        expected_endlines.append("PACKAGECONFIG[glx] --enable-glx,--disable-glx,xorgproto virtual/libgl virtual/libx11")
+        expected_endlines.append("PACKAGECONFIG[glamor] --enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl")
+        expected_endlines.append("PACKAGECONFIG[unwind] --enable-libunwind,--disable-libunwind,libunwind")
+        expected_endlines.append("PACKAGECONFIG[xshmfence] --enable-xshmfence,--disable-xshmfence,libxshmfence")
+        expected_endlines.append("PACKAGECONFIG[xmlto] --with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native")
+        expected_endlines.append("PACKAGECONFIG[systemd-logind] --enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,")
+        expected_endlines.append("PACKAGECONFIG[systemd] --with-systemd-daemon,--without-systemd-daemon,systemd")
+        expected_endlines.append("PACKAGECONFIG[xinerama] --enable-xinerama,--disable-xinerama,xorgproto")
+        expected_endlines.append("PACKAGECONFIG[xwayland] --enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy")
+        expected_endlines.append("PACKAGECONFIG[openssl] --with-sha1=libcrypto,,openssl")
+        expected_endlines.append("PACKAGECONFIG[nettle] --with-sha1=libnettle,,nettle")
+        expected_endlines.append("PACKAGECONFIG[gcrypt] --with-sha1=libgcrypt,,libgcrypt")
+
+        self.check_endlines(results, expected_endlines)
+
+    def test_packageconfig_flags_optiins_preferred_only(self):
+        results = runCmd('../scripts/contrib/list-packageconfig-flags.py -p')
+        expected_endlines = []
+        expected_endlines.append("RECIPE NAME                                      PACKAGECONFIG FLAGS")
+        expected_endlines.append("xserver-xorg-1.20.3                              dri dri2 dri3 gcrypt glamor glx nettle openssl systemd systemd-logind udev unwind xinerama xmlto xshmfence xwayland")
+
+        self.check_endlines(results, expected_endlines)
+
-- 
2.7.4



  reply	other threads:[~2019-04-22 12:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 12:41 [QA][PATCH 0/7] Manual test cleanup Armin Kuster
2019-04-22 12:41 ` Armin Kuster [this message]
2019-04-24 15:05   ` [QA][PATCH 1/7] manual tests migrate to selftest Richard Purdie
2019-04-22 12:41 ` [QA][PATCH 2/7] manual qa/oe-core: remove packageconfig flag tests Armin Kuster
2019-04-22 12:41 ` [QA][PATCH 3/7] manual qa/bsp-qemu: remove rpm tests already done in runtime Armin Kuster
2019-04-22 12:41 ` [QA][PATCH 4/7] manual qa/bsp-qemu: remove KVM enabled which is already done in selftest runqemu Armin Kuster
2019-04-22 12:41 ` [QA][PATCH 5/7] manual/bsp-qemu: drop xserver test Armin Kuster
2019-04-22 12:41 ` [QA][PATCH 6/7] manual/bsp-qemu: remove connmand test done in runtime test Armin Kuster
2019-04-22 12:41 ` [QA][PATCH 7/7] manual sdk: remove this manual sdk test Armin Kuster
2019-04-22 15:03   ` Richard Purdie
2019-04-22 15:52     ` akuster808

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1555936919-19078-2-git-send-email-akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.