[KERNEL][TEST] Fix makeflop usage and small details

git-svn-id: svn://kolibrios.org@9317 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Magomed Kostoev (mkostoevr) 2021-11-25 23:04:42 +00:00
parent a849cabad0
commit 98d64b669d
2 changed files with 3 additions and 6 deletions

View File

@ -100,9 +100,6 @@ if __name__ == "__main__":
img_data = img.read() img_data = img.read()
img = common.Floppy(img_data) img = common.Floppy(img_data)
# Remove old kernel (may fail if we removed it before so no check here)
img.delete_path("kernel.mnt")
# Remove unuseful folders # Remove unuseful folders
img.delete_path("GAMES") img.delete_path("GAMES")
img.delete_path("DEMOS") img.delete_path("DEMOS")
@ -122,7 +119,7 @@ if __name__ == "__main__":
# Put the kernel into IMG # Put the kernel into IMG
with open("kernel.mnt.pretest", "rb") as kernel_mnt_pretest: with open("kernel.mnt.pretest", "rb") as kernel_mnt_pretest:
kernel_mnt_pretest_data = kernel_mnt_pretest.read() kernel_mnt_pretest_data = kernel_mnt_pretest.read()
img.add_file_path("kernel.mnt", kernel_mnt_pretest_data) img.add_file_path("KERNEL.MNT", kernel_mnt_pretest_data)
img.save("kolibri_test.img") img.save("kolibri_test.img")
# Collect tests from test folder (not recursively yet) # Collect tests from test folder (not recursively yet)

View File

@ -90,9 +90,9 @@ class Floppy:
self.path = "" self.path = ""
self.incipit = data[0] self.incipit = data[0]
if self.incipit != 0x00 and self.incipit != Floppy.EMPTY: if self.incipit != 0x00 and self.incipit != Floppy.EMPTY:
filename = data[0:8].decode("ASCII") filename = data[0:8].decode("cp866")
filename = filename.rstrip(" ") filename = filename.rstrip(" ")
extension = data[8:11].decode("ASCII") extension = data[8:11].decode("cp866")
extension = extension.rstrip(" ") extension = extension.rstrip(" ")
self.path = filename self.path = filename
if len(extension) > 0: if len(extension) > 0: