diff options
| -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)) | ||
