forked from bootlin/snagboot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tests.py
33 lines (20 loc) · 845 Bytes
/
tests.py
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
from snagfactory.config import read_config
from snagfactory.gui import SnagFactory
from snagfactory.session import SnagFactorySession
from snagrecover.usb import SnagbootUSBContext
from kivy.lang import Builder
print("Testing config file reader")
config_files = ["docs/snagfactory-emmc.yaml", "docs/snagfactory-mtd.yaml"]
for config_file in config_files:
read_config(config_file, check_paths=False)
print("Testing Kivy application builder")
app = SnagFactory()
Builder.load_file("src/snagfactory/gui.kv")
Builder.load_file("src/snagfactory/config.kv")
print("Testing Snagfactory session init")
session = SnagFactorySession(None)
print("Testing Snagboot USB context initialization")
SnagbootUSBContext.rescan()
print("Testing Snagboot USB context hard rescan")
SnagbootUSBContext.hard_rescan()
print("All tests ran without errors")