commit:     cad4692301c1c91ba83e64817f93aef6ef4197ce
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  2 10:20:50 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Thu Jan  2 10:22:18 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cad46923

app-emulation/virtualbox-kvm: add missing test file

I forgot to add this when updating to branch 7.1.

Closes: https://bugs.gentoo.org/947335
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/files/test_python.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/files/test_python.py 
b/app-emulation/virtualbox-kvm/files/test_python.py
new file mode 100644
index 000000000000..da03af795501
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/files/test_python.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+
+# Smoke test for python:
+# Test if the python bindings have been built and if python is crashing when 
creating a manager
+
+def test_module_was_built():
+    import os
+    assert os.path.isfile(os.getenv('VBOX_PROGRAM_PATH') + '/VBoxPython3.so')
+
+def test_VirtualBoxManager():
+    from vboxapi import VirtualBoxManager
+    try:
+        manager = VirtualBoxManager()
+    except:
+        # if it reaches here, it did not crash
+        pass

Reply via email to