diff options
author | Tim Orling <ticotimo@gmail.com> | 2023-12-16 21:41:31 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-17 19:07:22 +0000 |
commit | 844e91049c814f574a6109f3fc82b0fa65e2be17 (patch) | |
tree | 48b96549d30e306fb82b1f97502b0debc6250c53 /meta/lib/oeqa/runtime | |
parent | 9707dc5549b67fa4ab9e10a52e6eb0ce2f8f50c9 (diff) | |
download | poky-844e91049c814f574a6109f3fc82b0fa65e2be17.tar.gz |
oe-selfest: add maturn runtime (testimage) test
Basic smoke test for maturin to test the 'maturin list-python' case.
(From OE-Core rev: 47c948c3cf6e582abd12021ceeff2c20a3e81fb5)
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-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 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | import os | ||
8 | |||
9 | from oeqa.runtime.case import OERuntimeTestCase | ||
10 | from oeqa.core.decorator.depends import OETestDepends | ||
11 | from oeqa.runtime.decorator.package import OEHasPackage | ||
12 | |||
13 | class MaturinTest(OERuntimeTestCase): | ||
14 | @OETestDepends(['ssh.SSHTest.test_ssh', 'python.PythonTest.test_python3']) | ||
15 | @OEHasPackage(['python3-maturin']) | ||
16 | def test_maturin_list_python(self): | ||
17 | status, output = self.target.run("maturin list-python") | ||
18 | self.assertEqual(status, 0) | ||
19 | _, py_major = self.target.run("python3 -c 'import sys; print(sys.version_info.major)'") | ||
20 | _, py_minor = self.target.run("python3 -c 'import sys; print(sys.version_info.minor)'") | ||
21 | python_version = "%s.%s" % (py_major, py_minor) | ||
22 | self.assertEqual(output, "🐍 1 python interpreter found:\n" | ||
23 | " - CPython %s at /usr/bin/python%s" % (python_version, python_version)) | ||