ARMmbed / mbed-os-tf-m-regression-tests

An Mbed OS application that runs the TF-M regression tests
2 stars 12 forks source link

Fix: Permission issue on Windows when using `test_psa_target.py` #24

Closed jainvikas8 closed 3 years ago

jainvikas8 commented 4 years ago

There is a problem with Windows permission issue, to delete a file or move a file when using the script in pipenv --three (python3 environment only). On a native machine this could be different.

Issues faced:

[Test-Target] 10:52:07: PermissionError: [WinError 5] Access is denied: 'C:\\Work\\Workspace\\mbed-os-tf-m-regression-tests\\mbed-os\\TARGET_IGNORE\\psa-arch-tests\\ap.-tests\\BUILD\\psa_qcbor\\.git\\objects\\pack\\pack-48c1740dc4702a3a1990ee154c269a64d4b1cd08.idx'
[Test-Target] 12:00:28: [Build-PSA-Compliance-tests] 12:00:28: shutil.move(file+".update", file)                                            
[Test-Target] 12:00:28: [Build-PSA-Compliance-tests] 12:00:28: File "C:\Program Files\Python37\lib\shutil.py", line 578, in move                              
[Test-Target] 12:00:28: [Build-PSA-Compliance-tests] 12:00:28: os.unlink(src) [Test-Target] 12:00:28: [Build-PSA-Compliance-tests] 12:00:28: PermissionError: [WinError 32] The process cannot access the file because it is being used by another pr.cess: 'platform/manifests/driver_partition_psa.json.update'
jainvikas8 commented 3 years ago

Issue fixed