android - Spoon deleted all the files in the Documents directory -
i using spoon run automated tests on android devices. have made shell script @ point runs tests through spoon on connected devices. configured saves output in /users/myusername/documents/ run_id unix timestamp.
my problem that, (4 times until now, in 6 months) deletes files , folders found in documents directory. don't know why it's frustrating have other things saved in there, shouldn't deleted means. don't know change behaviour hope guys can give me advice.
this error output got when tried delete (managed catch it):
2015-08-05 13:54:27 [sr.runtests] executing instrumentation suite on 7 device(s). exception in thread "main" java.lang.runtimeexception: unable clean output directory: /users/myusername/documents @ com.squareup.spoon.spoonrunner.runtests(spoonrunner.java:132) @ com.squareup.spoon.spoonrunner.run(spoonrunner.java:113) @ com.squareup.spoon.spoonrunner.main(spoonrunner.java:530) caused by: java.io.ioexception: unable delete file: /users/myusername/documents/framework/automation/node_modules/scribe-js/node_modules/.bin/mkdirp @ org.apache.commons.io.fileutils.forcedelete(fileutils.java:2279) @ org.apache.commons.io.fileutils.cleandirectory(fileutils.java:1653) @ org.apache.commons.io.fileutils.deletedirectory(fileutils.java:1535) @ org.apache.commons.io.fileutils.forcedelete(fileutils.java:2270) @ org.apache.commons.io.fileutils.cleandirectory(fileutils.java:1653) @ org.apache.commons.io.fileutils.deletedirectory(fileutils.java:1535) @ org.apache.commons.io.fileutils.forcedelete(fileutils.java:2270) @ org.apache.commons.io.fileutils.cleandirectory(fileutils.java:1653) @ org.apache.commons.io.fileutils.deletedirectory(fileutils.java:1535) @ org.apache.commons.io.fileutils.forcedelete(fileutils.java:2270) @ org.apache.commons.io.fileutils.cleandirectory(fileutils.java:1653) @ org.apache.commons.io.fileutils.deletedirectory(fileutils.java:1535) @ org.apache.commons.io.fileutils.forcedelete(fileutils.java:2270) @ org.apache.commons.io.fileutils.cleandirectory(fileutils.java:1653) @ org.apache.commons.io.fileutils.deletedirectory(fileutils.java:1535) @ org.apache.commons.io.fileutils.forcedelete(fileutils.java:2270) @ org.apache.commons.io.fileutils.cleandirectory(fileutils.java:1653) @ org.apache.commons.io.fileutils.deletedirectory(fileutils.java:1535) @ org.apache.commons.io.fileutils.forcedelete(fileutils.java:2270) @ org.apache.commons.io.fileutils.cleandirectory(fileutils.java:1653) @ org.apache.commons.io.fileutils.deletedirectory(fileutils.java:1535) @ com.squareup.spoon.spoonrunner.runtests(spoonrunner.java:130) ... 2 more
the shell script starts spoon looks this:
java -xmx1024m -jar /users/myusername/documents/programmingstuff/spoon-runner-1.1.10-jar-with-dependencies.jar --apk /users/myusername/git/hb_android_30/bin/beta.apk --test-apk /users/myusername/documents/programmingstuff/regression-git/bin/prod.apk --sdk /users/myusername/documents/programmingstuff/android-sdk-macosx --output /users/myusername/documents/$1 &&
where $1 run_id passed shell script.
so far, had backups of in documents folder, it's annoying restore it.
i discovered problem was. script didn't got parameter $1 empty , command deleted contents in documents folder.
Comments
Post a Comment