-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrun_desktop_lv_tests.py
More file actions
executable file
·51 lines (36 loc) · 1.14 KB
/
Copy pathrun_desktop_lv_tests.py
File metadata and controls
executable file
·51 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env python3
"""
Run LVGL timer/input harness on desktop Python+LVGL executables.
Thin wrapper around ``lv_timer_test_kit.py``: sync + async, strict click
checks, results in the system temp directory.
From repo root:
python tools/run_desktop_lv_tests.py
./tools/run_desktop_lv_tests.py
For per-interpreter selection, use ``python tools/lv_timer_test_kit.py`` instead.
"""
from __future__ import annotations
import os
from pathlib import Path
import sys
import tempfile
REPO = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(REPO / "tools"))
from lv_timer_test_kit import LVGL_INTERPRETERS, run_kit # noqa: E402
def _temp_dir() -> Path:
return Path(
os.environ.get("TEMP")
or os.environ.get("TMPDIR")
or os.environ.get("TMP")
or tempfile.gettempdir()
)
DESKTOP_RESULTS = _temp_dir() / "desktop_lv_test_results.json"
DESKTOP_MODES = ("sync", "async")
def main() -> int:
return run_kit(
only=list(LVGL_INTERPRETERS),
modes=DESKTOP_MODES,
strict_clicks=True,
results_path=DESKTOP_RESULTS,
)
if __name__ == "__main__":
sys.exit(main())