USB-AIO für automatische Geräteprüfung
Some checks failed
Tests / test (push) Has been cancelled

This commit is contained in:
2026-10-14 20:14:36 +02:00
commit 81f06cf6b4
40 changed files with 9956 additions and 0 deletions

15
tests/smoke.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "$0")/.."
for sh in scripts/*.sh; do bash -n "$sh"; done
python -m py_compile scripts/*.py
python - <<'PY'
import json, pathlib, sqlite3, subprocess, tempfile
with tempfile.TemporaryDirectory() as td:
p=pathlib.Path(td); report=p/'report.json'; db=p/'database'/'intake.sqlite3'
report.write_text(json.dumps({'asset_id':'PC-0001','tool_version':'1.1.1','model':'Test PC','cpu':'CPU','health_gate':'REVIEW','timestamp_unix':123}))
subprocess.run(['python','scripts/db-import.py',str(db),str(report)],check=True)
subprocess.run(['python','scripts/db-view.py',str(db)],check=True)
with sqlite3.connect(db) as c: assert c.execute('SELECT count(*) FROM scans').fetchone()[0]==1
print('smoke checks OK')
PY