Skip to content

Commit 80e8afe

Browse files
committed
Utils: Update testing scripts
Testing script 'update_iso' is using virt-install to test the built ISO. With every run virt-install will create new virtual drive in ~/.local/share/libvirt/images. With 20G size of each it may lead to filling up host HDD pretty fast. This commit configures virt-install to reuse the same disk image located in the main project directory. This way it saves the space and makes it easy to remove if needed.
1 parent 2b94b40 commit 80e8afe

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.lo
66
*.o
77
*.pyc
8+
*.qcow2
89
*.so
910
*.typelib
1011
*~

scripts/testing/update_iso

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ PROJECT_DIR = os.path.dirname(
2222
)
2323
)
2424

25+
# Virtual disk location
26+
VIRT_DISK = os.path.join(PROJECT_DIR, "tmp_virt_disk.qcow2")
27+
2528
# Relative path to the ISO folder within the project
2629
ISO_FOLDER = os.path.join(PROJECT_DIR, "result", "iso")
2730

@@ -212,6 +215,7 @@ def get_virt_install_command_line():
212215
"--name", "anaconda-updated-iso", "--os-variant=detect=on",
213216
"--memory", "4096", "--graphics", "vnc,listen=127.0.0.2",
214217
"--transient",
218+
"--disk", VIRT_DISK + ",size=20",
215219
"--location", UPDATED_ISO]
216220
return cmd
217221

0 commit comments

Comments
 (0)