{"id":20323981,"url":"https://github.com/etchdroid/qemu_test_orchestrator","last_synced_at":"2025-04-11T19:32:45.390Z","repository":{"id":119091048,"uuid":"285714964","full_name":"etchdroid/qemu_test_orchestrator","owner":"etchdroid","description":"Helper program to run automated tests for Libaums/EtchDroid in a QEMU/KVM Android x86 VM","archived":false,"fork":false,"pushed_at":"2020-09-22T02:51:39.000Z","size":92,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T15:21:30.378Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etchdroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-07T02:10:55.000Z","updated_at":"2024-12-14T12:22:14.000Z","dependencies_parsed_at":"2023-05-13T02:00:37.078Z","dependency_job_id":null,"html_url":"https://github.com/etchdroid/qemu_test_orchestrator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchdroid%2Fqemu_test_orchestrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchdroid%2Fqemu_test_orchestrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchdroid%2Fqemu_test_orchestrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etchdroid%2Fqemu_test_orchestrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etchdroid","download_url":"https://codeload.github.com/etchdroid/qemu_test_orchestrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248467078,"owners_count":21108591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T19:31:11.097Z","updated_at":"2025-04-11T19:32:45.383Z","avatar_url":"https://github.com/etchdroid.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QEMU Android Test Orchestrator\n\nThis is a slightly overkill spaghetti program to set up automated instrumented tests on an emulated Android device on a CI environment.\n\nIt addresses the following problems:\n\n- Run with a clean Android-x86 image and bring up \"VirtWifi\" and ADB\n- Run with latest QEMU (the Android emulator doesn't work, and in general it doesn't work for this use-case since the USB stick emulation is broken)\n- Be configurable at runtime to some extent\n- Try to be somewhat stable and reliable\n\n## Configuration\n\nDefault config should be pretty straight-forward, I already spent too much time on this and I don't wanna spend more on documenting it too much. It is\nlocated here: [qemu_android_test_orchestrator/config.py](qemu_android_test_orchestrator/config.py)\n\nIt can be overridden by either providing a `config.json` in the `ORCHESTRATOR_CONFIG` environment var, or by setting environment variables which you can\nalso find in the same file towards the bottom.\n\nDefaults are set up to work with EtchDroid/Libaums.\n\n## How it works (hopefully)\n\nThe main idea is that each specific task is handled by a specific worker. For example, bringing up QEMU, connecting to Wi-Fi, checking if ADB is okay,\nrunning the tests.\n\nEach worker is a state machine, and there's a global state machine.\n\nThe global state machine tries to go through the following states:\n\n`QEMU_UP`, `NETWORK_UP`, `ADB_UP`, `JOB` (tests)\n\nThe global FSM will wait for all workers to reach a certain state before proceeding to the next one. If any worker fails, it will attempt to bring all\nof them into the `STOP` state at which they should all shut down.\n\nEach worker will hook itself up to its required states and work independently. This allows specific workers to be added or removed to handle different\nquirks required for different Android images, without affecting the others. For example, the hacky `VirtWifiEnabler` worker may not be needed on images\nthat automatically connect to emulated Ethernet and do not show a fake \"VirtWifi\" network like Android-x86 9 does.\n\n\n## Making changes\n\nWhile this code was written for a particular reason, project and use-case, I can see how it can be used for other projects too. I didn't spend too much\ntime making sure it's generic enough but it should be quite reusable. Feel free to send patches if you want to add features/fix stuff :)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetchdroid%2Fqemu_test_orchestrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetchdroid%2Fqemu_test_orchestrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetchdroid%2Fqemu_test_orchestrator/lists"}