nixos/tests/android-translation-layer: init
This commit is contained in:
parent
65b50722bd
commit
ca255779a7
@ -208,6 +208,7 @@ in
|
||||
amazon-init-shell = runTest ./amazon-init-shell.nix;
|
||||
amazon-ssm-agent = runTest ./amazon-ssm-agent.nix;
|
||||
amd-sev = runTest ./amd-sev.nix;
|
||||
android-translation-layer = runTest ./android-translation-layer.nix;
|
||||
angie-api = runTest ./angie-api.nix;
|
||||
anki-sync-server = runTest ./anki-sync-server.nix;
|
||||
anubis = runTest ./anubis.nix;
|
||||
|
||||
40
nixos/tests/android-translation-layer.nix
Normal file
40
nixos/tests/android-translation-layer.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
# Example Android app
|
||||
demoApp = pkgs.fetchurl {
|
||||
url = "https://gitlab.com/android_translation_layer/atl_test_apks/-/raw/061e32a3172c8167b1746768d098f0e62d8f564b/demo_app.apk";
|
||||
hash = "sha256-aXxLZEAMNsL6nL4r2N9rVsbBPmf3+gFGmgo3kZjdo4s=";
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "android-translation-layer";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ onny ];
|
||||
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common/x11.nix
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = [ pkgs.android-translation-layer ];
|
||||
};
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_x()
|
||||
|
||||
with subtest("launch android translation layer demo app"):
|
||||
machine.succeed("android-translation-layer ${demoApp} >&2 &")
|
||||
machine.sleep(10)
|
||||
machine.wait_for_text(r"hello PoC world!")
|
||||
machine.screenshot("atl_demo_app")
|
||||
|
||||
machine.succeed("pkill -f android-translation-layer")
|
||||
'';
|
||||
}
|
||||
@ -24,6 +24,7 @@
|
||||
alsa-lib,
|
||||
makeWrapper,
|
||||
replaceVars,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@ -86,6 +87,10 @@ stdenv.mkDerivation {
|
||||
--prefix LD_LIBRARY_PATH : ${art-standalone}/lib/art
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) android-translation-layer;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Translation layer that allows running Android apps on a Linux system";
|
||||
homepage = "https://gitlab.com/android_translation_layer/android_translation_layer";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user