~nuclearbob/ubuntu-test-cases/bootspeed-nfss

« back to all changes in this revision

Viewing changes to tests/suspend-blocker/suspend-blocker/suspend-blocker.sh

MergedĀ upstreamĀ changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
cleanup() {
5
5
        #In case anything goes wrong, try to leave the device attached
6
 
        ncd_usb.py -u http://qa-relay-control -b 0 -r 0 on
 
6
        ncd_usb.py -u http://qa-relay-control.ubuntu-ci -b 0 -r 0 on
7
7
}
8
8
 
9
9
trap cleanup TERM INT EXIT
10
10
 
11
 
${TARGET_PREFIX} rm -f /var/log/kern.log
12
 
${TARGET_PREFIX} restart rsyslog
13
 
${TARGET_PREFIX} sudo -iu phablet start susblock
 
11
${TARGET_PREFIX} sudo rm -f /var/log/syslog
 
12
${TARGET_PREFIX} sudo restart rsyslog
 
13
${TARGET_PREFIX} start susblock
14
14
 
15
15
#Turn off the USB port for this device
16
 
ncd_usb.py -u http://qa-relay-control -b 0 -r 0 off 
17
 
sleep 1800
 
16
ncd_usb.py -u http://qa-relay-control.ubuntu-ci -b 0 -r 0 off 
 
17
sleep 100
18
18
#Turn on the USB port for this device
19
 
ncd_usb.py -u http://qa-relay-control -b 0 -r 0 on
 
19
ncd_usb.py -u http://qa-relay-control.ubuntu-ci -b 0 -r 0 on
20
20
# Wait for the device to come back
21
21
timeout 300 adb wait-for-device
22
22
# If we can't stop susblock, it's probably because it already stopped itself
23
 
${TARGET_PREFIX} sudo -iu phablet stop susblock || /bin/true
24
 
${TARGET_PREFIX} /tmp/suspend-blocker/suspend-blocker -rbH -o /tmp/results/kern.json /var/log/kern.log
25
 
${TARGET_PREFIX} cp /var/log/kern.log /tmp/results
 
23
${TARGET_PREFIX} stop susblock || /bin/true
 
24
${TARGET_PREFIX} sudo /tmp/suspend-blocker/suspend-blocker -rbH -o /tmp/results/kern.json /var/log/syslog
 
25
${TARGET_PREFIX} sudo cp /var/log/syslog /tmp/results
 
26
${TARGET_PREFIX} sudo chown -R phablet.phablet /tmp/results