summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qusbdual.py
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-07-06 17:22:17 +0200
committerHector Fernandez <hector@iatec.biz>2020-07-06 17:22:17 +0200
commit1d51a80b57cc8c80c78d67c85290503997060e9e (patch)
treeb39712b4f90369280e75adfee3ef81a128dfe3e8 /test-cli/test/tests/qusbdual.py
parentcd3c8dd78e3bcdd442967583e3814db3701871c0 (diff)
downloadboard-1d51a80b57cc8c80c78d67c85290503997060e9e.zip
board-1d51a80b57cc8c80c78d67c85290503997060e9e.tar.gz
board-1d51a80b57cc8c80c78d67c85290503997060e9e.tar.bz2
Modified paths of ram and nfs temporary folders.
Diffstat (limited to 'test-cli/test/tests/qusbdual.py')
-rw-r--r--test-cli/test/tests/qusbdual.py34
1 files changed, 17 insertions, 17 deletions
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