Lines Matching +full:- +full:- +full:output +full:- +full:on +full:- +full:failure

25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 # Collection of common shell functions for 'run-checks.sh' et 'test-shell.sh'
40 set -o posix
48 # Ctrl-C, logout, etc.
51 if [ -z "$_ALL_CLEANUPS" ]; then
54 # - Exiting normally (EXIT)
55 # - Interrupted by Ctrl-C (INT)
56 # - Interrupted by log out (HUP)
57 # - Being asked to quit nicely (TERM)
58 # - Being asked to quit and dump core (QUIT)
65 # Called on exit if at least one function was registered with atexit
105 _VERBOSE=$(( $_VERBOSE - 1 ))
111 [ "$_VERBOSE" -gt "$1" ]
117 [ "$_VERBOSE" -le "$1" ]
120 # Dump message to stdout, unless verbosity is < 0, i.e. --quiet was called
123 if [ "$_VERBOSE" -ge 0 ]; then
128 # If --verbose was used, dump a message to stdout.
131 if [ "$_VERBOSE" -ge 1 ]; then
138 # Set a run log file that can be used to collect the output of commands that
144 # Run a command. Output depends on $_VERBOSE:
145 # $_VERBOSE <= 0: Run command, store output into the run log
146 # $_VERBOSE >= 1: Dump command, run it, output goest to stdout
147 # Note: Ideally, the command's output would go to the run log for $_VERBOSE >= 1
158 if [ "$_VERBOSE" -ge 1 ]; then
166 # Same as run(), but only dump command output for $_VERBOSE >= 2
175 if [ "$_VERBOSE" -ge 1 ]; then
178 if [ "$_VERBOSE" -ge 2 ]; then
188 case $(uname -s) in
190 grep -c -e '^processor' /proc/cpuinfo
193 sysctl -n hw.ncpu
195 CYGWIN*|*_NT-*)
207 # On success, return nothing, but updates internal variables so later calls to
211 # On failure, returns 1, and updates the internal adb error message, which can
215 # Return: success or failure.
223 if [ -z "$_ADB" ]; then
225 if [ -z "$_ADB" -a "$ANDROID_SDK_ROOT" ]; then
226 _ADB=$ANDROID_SDK_ROOT/platform-tools/adb
227 if [ ! -f "$_ADB" ]; then
231 if [ -z "$_ADB" ]; then
259 # On failure, return the empty string.
260 # Out: ADB program path (or empty on failure)
261 # Return: success or failure.
264 if [ -z "$_ADB_STATUS" ]; then
271 # Return the error corresponding to the last ADB function failure.
277 # In case of failure, use adb_get_error to know why this failed.
279 # Return: success or failure.
297 NUM_DEVICES=$(echo "$ADB_DEVICES" | wc -l)
334 # Out: command output (stdout + stderr combined)
340 ADB_LOG=$(mktemp "${TMPDIR:-/tmp}/adb-XXXXXXXX")
342 sed -i -e 's![[:cntrl:]]!!g' "$ADB_LOG" # Remove \r.
343 RET=$(sed -e '$!d' "$ADB_LOG") # Last line contains status code.
344 sed -e '$d' "$ADB_LOG" # Print everything except last line.
345 rm -f "$ADB_LOG"
352 # Return: success or failure.
361 # Return: success or failure.