os-tester 0.2.0.dev1__tar.gz → 0.3.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of os-tester might be problematic. Click here for more details.
- {os-tester-0.2.0.dev1/src/os_tester.egg-info → os-tester-0.3.0.dev1}/PKG-INFO +9 -9
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/README.md +8 -8
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/pyproject.toml +1 -1
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester/vm.py +2 -5
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1/src/os_tester.egg-info}/PKG-INFO +9 -9
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/LICENSE +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/setup.cfg +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester/__init__.py +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester/debug_plot.py +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester/stages.py +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester.egg-info/SOURCES.txt +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester.egg-info/dependency_links.txt +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester.egg-info/requires.txt +0 -0
- {os-tester-0.2.0.dev1 → os-tester-0.3.0.dev1}/src/os_tester.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: os-tester
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0.dev1
|
|
4
4
|
Summary: A Python pip package to automate testing of whole operating systems with an image recognition based approach and libvirt (qemu). Inspired by openQA.
|
|
5
5
|
Author-email: Fabian Sauter <fabian.sauter+pip@apsensing.com>
|
|
6
6
|
Maintainer-email: Fabian Sauter <fabian.sauter+pip@apsensing.com>
|
|
@@ -129,17 +129,11 @@ def get_vm_xml(name: str, title: str, uuid: str, isoPath: str, vmImagePath: str)
|
|
|
129
129
|
"""
|
|
130
130
|
|
|
131
131
|
if __name__ == "__main__":
|
|
132
|
-
# Load stages automation.
|
|
133
|
-
# We expect the `stages.yml` and referenced files inside the stages directory.
|
|
134
|
-
basePath: str = "stages"
|
|
135
|
-
stagesObj: stages = stages(basePath)
|
|
136
|
-
print(stagesObj)
|
|
137
|
-
|
|
138
132
|
# Connect to qemu
|
|
139
133
|
conn: libvirt.virConnect = libvirt.open("qemu:///system")
|
|
140
134
|
|
|
141
135
|
uuid: str = "1e6cae9f-41d7-4fca-8033-fbd538a65173" # Replace with your (random?) UUID
|
|
142
|
-
vmObj: vm = vm(conn, uuid,
|
|
136
|
+
vmObj: vm = vm(conn, uuid, debugPlt=False)
|
|
143
137
|
|
|
144
138
|
# Delete eventually existing VMs
|
|
145
139
|
if vmObj.try_load():
|
|
@@ -160,7 +154,13 @@ if __name__ == "__main__":
|
|
|
160
154
|
)
|
|
161
155
|
vmObj.create(vmXml)
|
|
162
156
|
|
|
163
|
-
|
|
157
|
+
# Load stages automation.
|
|
158
|
+
# We expect the `stages.yml` and referenced files inside the stages directory.
|
|
159
|
+
basePath: str = "stages"
|
|
160
|
+
stagesObj: stages = stages(basePath)
|
|
161
|
+
print(stagesObj)
|
|
162
|
+
|
|
163
|
+
vmObj.run_stages(stagesObj)
|
|
164
164
|
|
|
165
165
|
print("All stages done. Exiting...")
|
|
166
166
|
conn.close()
|
|
@@ -102,17 +102,11 @@ def get_vm_xml(name: str, title: str, uuid: str, isoPath: str, vmImagePath: str)
|
|
|
102
102
|
"""
|
|
103
103
|
|
|
104
104
|
if __name__ == "__main__":
|
|
105
|
-
# Load stages automation.
|
|
106
|
-
# We expect the `stages.yml` and referenced files inside the stages directory.
|
|
107
|
-
basePath: str = "stages"
|
|
108
|
-
stagesObj: stages = stages(basePath)
|
|
109
|
-
print(stagesObj)
|
|
110
|
-
|
|
111
105
|
# Connect to qemu
|
|
112
106
|
conn: libvirt.virConnect = libvirt.open("qemu:///system")
|
|
113
107
|
|
|
114
108
|
uuid: str = "1e6cae9f-41d7-4fca-8033-fbd538a65173" # Replace with your (random?) UUID
|
|
115
|
-
vmObj: vm = vm(conn, uuid,
|
|
109
|
+
vmObj: vm = vm(conn, uuid, debugPlt=False)
|
|
116
110
|
|
|
117
111
|
# Delete eventually existing VMs
|
|
118
112
|
if vmObj.try_load():
|
|
@@ -133,7 +127,13 @@ if __name__ == "__main__":
|
|
|
133
127
|
)
|
|
134
128
|
vmObj.create(vmXml)
|
|
135
129
|
|
|
136
|
-
|
|
130
|
+
# Load stages automation.
|
|
131
|
+
# We expect the `stages.yml` and referenced files inside the stages directory.
|
|
132
|
+
basePath: str = "stages"
|
|
133
|
+
stagesObj: stages = stages(basePath)
|
|
134
|
+
print(stagesObj)
|
|
135
|
+
|
|
136
|
+
vmObj.run_stages(stagesObj)
|
|
137
137
|
|
|
138
138
|
print("All stages done. Exiting...")
|
|
139
139
|
conn.close()
|
|
@@ -25,19 +25,16 @@ class vm:
|
|
|
25
25
|
debugPlt: bool
|
|
26
26
|
|
|
27
27
|
vmDom: Optional[libvirt.virDomain]
|
|
28
|
-
stagesObj: stages
|
|
29
28
|
debugPlotObj: debugPlot
|
|
30
29
|
|
|
31
30
|
def __init__(
|
|
32
31
|
self,
|
|
33
32
|
conn: libvirt.virConnect,
|
|
34
33
|
uuid: str,
|
|
35
|
-
stagesObj: stages,
|
|
36
34
|
debugPlt: bool = False,
|
|
37
35
|
):
|
|
38
36
|
self.conn = conn
|
|
39
37
|
self.uuid = uuid
|
|
40
|
-
self.stagesObj = stagesObj
|
|
41
38
|
self.debugPlt = debugPlt
|
|
42
39
|
if self.debugPlt:
|
|
43
40
|
self.debugPlotObj = debugPlot()
|
|
@@ -184,12 +181,12 @@ class vm:
|
|
|
184
181
|
duration: float = time() - start
|
|
185
182
|
print(f"Stage '{stageObj.name}' finished after {duration}s.")
|
|
186
183
|
|
|
187
|
-
def run_stages(self) -> None:
|
|
184
|
+
def run_stages(self, stagesObj: stages) -> None:
|
|
188
185
|
"""
|
|
189
186
|
Executes all stages defined for the current VM and awaits every stage to finish before returning.
|
|
190
187
|
"""
|
|
191
188
|
stageObj: stage
|
|
192
|
-
for stageObj in
|
|
189
|
+
for stageObj in stagesObj.stagesList:
|
|
193
190
|
self.__run_stage(stageObj)
|
|
194
191
|
|
|
195
192
|
def try_load(self) -> bool:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: os-tester
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0.dev1
|
|
4
4
|
Summary: A Python pip package to automate testing of whole operating systems with an image recognition based approach and libvirt (qemu). Inspired by openQA.
|
|
5
5
|
Author-email: Fabian Sauter <fabian.sauter+pip@apsensing.com>
|
|
6
6
|
Maintainer-email: Fabian Sauter <fabian.sauter+pip@apsensing.com>
|
|
@@ -129,17 +129,11 @@ def get_vm_xml(name: str, title: str, uuid: str, isoPath: str, vmImagePath: str)
|
|
|
129
129
|
"""
|
|
130
130
|
|
|
131
131
|
if __name__ == "__main__":
|
|
132
|
-
# Load stages automation.
|
|
133
|
-
# We expect the `stages.yml` and referenced files inside the stages directory.
|
|
134
|
-
basePath: str = "stages"
|
|
135
|
-
stagesObj: stages = stages(basePath)
|
|
136
|
-
print(stagesObj)
|
|
137
|
-
|
|
138
132
|
# Connect to qemu
|
|
139
133
|
conn: libvirt.virConnect = libvirt.open("qemu:///system")
|
|
140
134
|
|
|
141
135
|
uuid: str = "1e6cae9f-41d7-4fca-8033-fbd538a65173" # Replace with your (random?) UUID
|
|
142
|
-
vmObj: vm = vm(conn, uuid,
|
|
136
|
+
vmObj: vm = vm(conn, uuid, debugPlt=False)
|
|
143
137
|
|
|
144
138
|
# Delete eventually existing VMs
|
|
145
139
|
if vmObj.try_load():
|
|
@@ -160,7 +154,13 @@ if __name__ == "__main__":
|
|
|
160
154
|
)
|
|
161
155
|
vmObj.create(vmXml)
|
|
162
156
|
|
|
163
|
-
|
|
157
|
+
# Load stages automation.
|
|
158
|
+
# We expect the `stages.yml` and referenced files inside the stages directory.
|
|
159
|
+
basePath: str = "stages"
|
|
160
|
+
stagesObj: stages = stages(basePath)
|
|
161
|
+
print(stagesObj)
|
|
162
|
+
|
|
163
|
+
vmObj.run_stages(stagesObj)
|
|
164
164
|
|
|
165
165
|
print("All stages done. Exiting...")
|
|
166
166
|
conn.close()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|