From 1d51a80b57cc8c80c78d67c85290503997060e9e Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Mon, 6 Jul 2020 17:22:17 +0200 Subject: Modified paths of ram and nfs temporary folders. --- test-cli/test/tests/qusbdual.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'test-cli/test/tests/qusbdual.py') diff --git a/test-cli/test/tests/qusbdual.py b/test-cli/test/tests/qusbdual.py index 842d514..054d7f4 100644 --- a/test-cli/test/tests/qusbdual.py +++ b/test-cli/test/tests/qusbdual.py @@ -32,45 +32,45 @@ class Qusbdual(unittest.TestCase): self.fail("failed: could not find any mass storage gadget") device = p.stdout.decode().split(" ")[0] # mount the mass storage gadget - sh.mkdir("-p", "/tmp/station/hdd_gadget") - p = sh.mount("-o", "ro", "/dev/" + device, "/tmp/station/hdd_gadget") + sh.mkdir("-p", "/mnt/station_ramdisk/hdd_gadget") + p = sh.mount("-o", "ro", "/dev/" + device, "/mnt/station_ramdisk/hdd_gadget") if p.exit_code != 0: self.fail("failed: Unable to mount the mass storage gadget.") # execute test for i in range(int(self.__repetitions)): # copy files try: - p = sh.cp("/tmp/station/hdd_gadget/usb-test.bin", "/tmp/station/hdd_gadget/usb-test.bin.md5", + p = sh.cp("/mnt/station_ramdisk/hdd_gadget/usb-test.bin", "/mnt/station_ramdisk/hdd_gadget/usb-test.bin.md5", "/tmp/stationnfs") except sh.ErrorReturnCode as e: - sh.umount("/tmp/station/hdd_gadget") - sh.rmdir("/tmp/station/hdd_gadget") + sh.umount("/mnt/station_ramdisk/hdd_gadget") + sh.rmdir("/mnt/station_ramdisk/hdd_gadget") self.fail("failed: Unable to copy files through USB.") # check if the device is still mounted - if not os.path.ismount("/tmp/station/hdd_gadget"): - sh.rm("/tmp/station/hdd_gadget/*") - sh.rmdir("/tmp/station/hdd_gadget") + if not os.path.ismount("/mnt/station_ramdisk/hdd_gadget"): + sh.rm("/mnt/station_ramdisk/hdd_gadget/*") + sh.rmdir("/mnt/station_ramdisk/hdd_gadget") self.fail("failed: USB device unmounted during/after copying files.") # Check md5 try: - p = sh.md5sum("/tmp/stationnfs/usb-test.bin") + p = sh.md5sum("/mnt/station_nfsdisk/usb-test.bin") except sh.ErrorReturnCode as e: - sh.umount("/tmp/station/hdd_gadget") - sh.rmdir("/tmp/station/hdd_gadget") + sh.umount("/mnt/station_ramdisk/hdd_gadget") + sh.rmdir("/mnt/station_ramdisk/hdd_gadget") self.fail("failed: Unable to calculate MD5 of the copied file.") newmd5 = p.stdout.decode().split(" ")[0] - with open('/tmp/station/hdd_gadget/usb-test.bin.md5', 'r') as outfile: + with open('/mnt/station_ramdisk/hdd_gadget/usb-test.bin.md5', 'r') as outfile: oldmd5 = outfile.read().rstrip("\n") outfile.close() if newmd5 != oldmd5: - sh.umount("/tmp/station/hdd_gadget") - sh.rmdir("/tmp/station/hdd_gadget") + sh.umount("/mnt/station_ramdisk/hdd_gadget") + sh.rmdir("/mnt/station_ramdisk/hdd_gadget") self.fail("failed: MD5 check failed.") # delete copied files - sh.rm("-f", "/tmp/stationnfs/usb-test.bin", "/tmp/stationnfs/usb-test.bin.md5") + sh.rm("-f", "/mnt/station_nfsdisk/usb-test.bin", "/mnt/station_nfsdisk/usb-test.bin.md5") # Finish - sh.umount("/tmp/station/hdd_gadget") - sh.rmdir("/tmp/station/hdd_gadget") + sh.umount("/mnt/station_ramdisk/hdd_gadget") + sh.rmdir("/mnt/station_ramdisk/hdd_gadget") def getresults(self): return self.__resultlist -- cgit v1.1