diff options
author | 2023-12-16 21:41:31 -0800 | |
---|---|---|
committer | 2023-12-17 19:04:40 +0000 | |
commit | 47c948c3cf6e582abd12021ceeff2c20a3e81fb5 (patch) | |
tree | 2e583fcc1266b4edc74a53c5af695fb5539426dd /meta/lib/oeqa | |
parent | 69b679380616a94a631681caa05d9bf7610f9372 (diff) | |
download | openembedded-core-contrib-47c948c3cf6e582abd12021ceeff2c20a3e81fb5.tar.gz |
oe-selfest: add maturn runtime (testimage) test
Basic smoke test for maturin to test the 'maturin list-python' case.
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/maturin.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/maturin.py b/meta/lib/oeqa/runtime/cases/maturin.py new file mode 100644 index 0000000000..b9a3b4acbc --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/maturin.py @@ -0,0 +1,23 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +import os + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage + +class MaturinTest(OERuntimeTestCase): + @OETestDepends(['ssh.SSHTest.test_ssh', 'python.PythonTest.test_python3']) + @OEHasPackage(['python3-maturin']) + def test_maturin_list_python(self): + status, output = self.target.run("maturin list-python") + self.assertEqual(status, 0) + _, py_major = self.target.run("python3 -c 'import sys; print(sys.version_info.major)'") + _, py_minor = self.target.run("python3 -c 'import sys; print(sys.version_info.minor)'") + python_version = "%s.%s" % (py_major, py_minor) + self.assertEqual(output, "🐍 1 python interpreter found:\n" + " - CPython %s at /usr/bin/python%s" % (python_version, python_version)) |