From eb8106abb35efbb88c372d50aaddd7ace2ee18e1 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 21 Apr 2019 18:31:39 -0600 Subject: lsb: add runtime Signed-off-by: Armin Kuster --- meta/lib/oeqa/runtime/cases/lsb.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 meta/lib/oeqa/runtime/cases/lsb.py (limited to 'meta/lib/oeqa/runtime/cases/lsb.py') diff --git a/meta/lib/oeqa/runtime/cases/lsb.py b/meta/lib/oeqa/runtime/cases/lsb.py new file mode 100644 index 0000000000..0ad4f9bafa --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/lsb.py @@ -0,0 +1,35 @@ +# LSB compliance runtime +# +# Copyright (c) 2019 MontaVista Software, LLC +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# + +import time +import datetime +import bb + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage + +class LSBTest(OERuntimeTestCase): + + @OETestDepends(['ssh.SSHTest.test_ssh']) + @OEHasPackage(["lsbtest", 'rpm', 'perl-mouldes']) + def test_lsb_test(self): + bb.warn("lsb-test") + cmd = "sh /opt/lsb-test/LSB_Test.sh" + bb.warn("%s" % cmd) + starttime = time.time() + (status, output) = self.target.run(cmd, 100) + endtime = time.time() + runtime = int(endtime - starttime) + bb.warn("lsb: %s %s" % (output, runtime)) -- cgit 1.2.3-korg