diff --git a/atx/device/ios/bootstrap.sh b/atx/device/ios/bootstrap.sh index 2f76355..fb2ac07 100755 --- a/atx/device/ios/bootstrap.sh +++ b/atx/device/ios/bootstrap.sh @@ -1,11 +1,12 @@ #!/bin/bash - # set -e -CWD=$(cd $(dirname $0); pwd) +WORKDIR=$PWD +cd $(dirname $0) BUNDLE_ID=${BUNDLE_ID:?} UDID=${UDID:-$(idevice_id -l)} -TEST="$CWD/instruments-test.js" +TEST="./instruments-test.js" TRACETEMPLATE="/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate" @@ -16,7 +17,7 @@ test -d $RESULTPATH || mkdir $RESULTPATH case "$1" in instruments) # python -m atx.taskqueue web &>/tmp/atx.taskqueue.log & - exec instruments -w ${UDID:?} -t "Automation" -D cli.trace $BUNDLE_ID -e UIASCRIPT $TEST # -e UIARESULTSPATH $RESULTPATH + exec instruments -w ${UDID:?} -t "Automation" -D $WORKDIR/cli.trace $BUNDLE_ID -e UIASCRIPT $TEST # -e UIARESULTSPATH $RESULTPATH #exec instruments -w ${UDID:?} -t "$TRACETEMPLATE" $BUNDLE_ID -e UIASCRIPT $TEST # -e UIARESULTSPATH $RESULTPATH ;; run) diff --git a/atx/taskqueue/__main__.py b/atx/taskqueue/__main__.py index f81778d..9ff1a29 100644 --- a/atx/taskqueue/__main__.py +++ b/atx/taskqueue/__main__.py @@ -46,12 +46,12 @@ def get(self, udid): item = yield que.get(timeout=time.time()+timeout) # timeout is a timestamp, strange print 'get from queue:', item self.write(item) + que.task_done() except gen.TimeoutError: print 'timeout' self.write('') finally: self.finish() - que.task_done() @gen.coroutine def post(self, udid):