From f94ef4827f70d4ced041b9683c4cdb7e93b93df9 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Thu, 23 Jun 2016 10:10:10 +0800 Subject: [PATCH] fix dir --- atx/device/ios/bootstrap.sh | 7 ++++--- atx/taskqueue/__main__.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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):