Open Bug 1018079 Opened 5 years ago Updated 4 years ago
[mozdevice] Provide a list of valid storage paths on the device
We need to be able to remove all files from a device's storage paths between tests to ensure each test starts in a clean state. Until recently we've been listing and removing the items in /sdcard, however it's become clear that this isn't sufficient on some devices. We enhanced getDeviceRoot to support a couple more valid paths in bug 1000918 but deviceRoot includes a 'tests' directory, which means we can't use it directly for the cleanup. Also, there could be more than one storage path. I propose we add a getStoragePaths method that returns a list of valid storage paths on the device. The first path in the list could even be used in getDeviceRoot. These paths can then be iterated over to list/remove files from the device's storage.
Summary: [mozdevice] Provide a list of storage paths on the device → [mozdevice] Provide a list of valid storage paths on the device
In bug 1000918 :dhylands mentions using |adb shell vdc volume list| to determine the storage paths. I've tried this on each of the devices I have, with the following results. Unagi: 110 sdcard /mnt/sdcard 2 Inari: 110 sdcard /mnt/sdcard 1 Leo: 110 sdcard /mnt/sdcard 4 110 extsdcard /mnt/extsdcard 0 Hamachi: 110 sdcard /mnt/sdcard 4 Tarako: 110 extsdcard /mnt/sdcard 4
:zac could you run this on the Flame (and any other devices you have that are not listed above) and post your results?
Flame: 110 0 external /storage/sdcard1 4 110 0 sdcard /storage/sdcard0 4 200 0 Volumes listed.
On some flame devices the result from |adb shell vdc volume list| is: 110 0 sdcard /storage/sdcard 4 110 0 sdcard1 /storage/sdcard1 0 200 0 Volumes listed. Because of this we are seeing failing tests on the grid. Dave should we add this to the cleanup method?
We can see this on b2g-15.1 and some other devices
Thanks for the additional data point, Bebe. This confirms that providing a list from mozdevice would be valuable. A short-term fix would be to add this new value here: https://github.com/mozilla-b2g/gaia/blob/dd8d9ad3e6ad7a0ed778353a745eda4cae44fcb4/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L771 and here: https://github.com/mozilla/b2gperf/blob/cec95829322d501b714cd68f84e1b857e1964928/b2gperf/b2gperf.py#L279
(In reply to Dave Hunt (:davehunt) from comment #6) > Thanks for the additional data point, Bebe. This confirms that providing a > list from mozdevice would be valuable. A short-term fix would be to add this > new value here: > https://github.com/mozilla-b2g/gaia/blob/ > dd8d9ad3e6ad7a0ed778353a745eda4cae44fcb4/tests/python/gaia-ui-tests/gaiatest/ > gaia_test.py#L771 and here: > https://github.com/mozilla/b2gperf/blob/ > cec95829322d501b714cd68f84e1b857e1964928/b2gperf/b2gperf.py#L279 See bug 1044019 and bug 1044965.
You need to log in before you can comment on or make changes to this bug.