Closed Bug 552441 Opened 14 years ago Closed 14 years ago

update devicemanager to have better error reporting on failed file transactions

Categories

(Testing :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jmaher, Assigned: jmaher)

Details

Attachments

(1 file, 1 obsolete file)

small changes to devicemanager.py to have better return values.
Attachment #432583 - Flags: review?(ctalbert)
Attachment #432583 - Flags: review?(ctalbert) → review-
Comment on attachment 432583 [details] [diff] [review]
devicemanager.py failure handling (1)

We discussed a few modifications to this on IRC:


[1:17pm] jmaher: I went ahead and did a if (self.dm.<fileoperation>() == None): raise FileError(msg)
[1:17pm] jmaher: this way we can do the majority of error logic in 1 file devicemanager.py
[1:17pm] ctalbert: I like htat
[1:17pm] ctalbert: did you add in a reboot command to deviceanager.py as well?
[1:18pm] jmaher: although I could just raise an error from inside of dm<fileoperation>
[1:18pm] jmaher: yes/no
[1:18pm] jmaher: I have setupbuildandtest.py call dm.sendCMD['rebt']
[1:18pm] jmaher: hehe
[1:18pm] jmaher: wasn't sure what you wanted there
[1:18pm] ctalbert: I think it should be something on devicemanager.py
[1:19pm] jmaher: I could add a reboot() and have it wait for it to come back
[1:19pm] jmaher: maybe with a variable
[1:19pm] jmaher: def reboot(self, wait=False)
[1:19pm] ctalbert: Optionally, that would be a good thing.  I'd want setupBuildAndTest to probably not wait for it, but sometimes we might want that functioanlity
[1:19pm] jmaher: and that could have logic to wait in there which would benefit many scripts
[1:19pm] ctalbert: wow my spelling is awesome
[1:20pm] jmaher: you deserve a speling bea awerd
[1:20pm] ctalbert: haha
[1:21pm] ctalbert: I really dislike that cd /tests hack in unpackFile
[1:21pm] jmaher: I was sort of bummed I had to generate so many little changes
[1:21pm] jmaher: ok, shall we just fix it now?
[1:21pm] jmaher: btw, that hack caught me one day and I wasted about 2 hours on it
[1:21pm] ctalbert: Yeah, I have a feeling its going to bite us.  How hard would it be to determine where the file is that you want to unpack and send in the proper cd command?
[1:22pm] ctalbert: And we could add in the reboot logic as well if you don't mind a bit o' patch bloat.
[1:22pm] jmaher: not hard, I will check for the file in / and /tests, if I can't find a dir in the filename
[1:23pm] ctalbert: that sounds very nice
[1:23pm] ctalbert: I like your FileError changes
[1:23pm] ctalbert:
[1:24pm] jmaher: cool
[1:24pm] ctalbert: I'm gonna r- this one and copy the chat log into the bug.
[1:24pm] jmaher: ok
[1:24pm] jmaher: get the other 4 r+ and I will be working on dm
updated with feedback.  Also have reboot and unpack all cleaned up.
Assignee: nobody → jmaher
Attachment #432583 - Attachment is obsolete: true
Attachment #432658 - Flags: review?(ctalbert)
Comment on attachment 432658 [details] [diff] [review]
devicemanager.py failure handling (2)

Thanks!
Attachment #432658 - Flags: review?(ctalbert) → review+
Checked in as changeset f1a43053f3b6
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: New Frameworks → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: