#!/bin/bash

# Wrapper script that runs the exopackage installer test on all connected
# devices
set -x
set -e
set -o pipefail

cd `dirname $0`
cd `git rev-parse --show-cdup`

RESULT=""
EXIT_CODE="0"

DEVICES=`adb devices | sed -rne '2,$s/^([^[:space:]]+).*/\1/p'`
for DEV in $DEVICES ; do
  RESULT="$RESULT$DEV"
  if ANDROID_SERIAL=$DEV ./scripts/exopackage_test_single.sh ; then
    RESULT="$RESULT SUCCESS^"
  else
    RESULT="$RESULT FAILURE^"
    EXIT_CODE=1
  fi
done

set +x
echo
echo $RESULT | tr ^ '\n'
exit $EXIT_CODE

#!/bin/bash

# Wrapper script that runs the exopackage installer test on all connected
# devices
set -x
set -e
set -o pipefail

cd `dirname $0`
cd `git rev-parse --show-cdup`

RESULT=""
EXIT_CODE="0"

DEVICES=`adb devices | sed -Ene '2,$s/^([^[:space:]]+).*/\1/p'`
for DEV in $DEVICES ; do
  RESULT="$RESULT$DEV"
  if ANDROID_SERIAL=$DEV ./scripts/exopackage_test_single.sh ; then
    RESULT="$RESULT SUCCESS^"
  else
    RESULT="$RESULT FAILURE^"
    EXIT_CODE=1
  fi
done

set +x
echo
echo $RESULT | tr ^ '\n'
exit $EXIT_CODE

Fix sed call for macs
Fix sed call for macs

Summary:
The mac version of sed doesn't recognize the -r flag, but it does
recognize -E (on linux, the flags do the same thing).

Test Plan: manual test on mac+linux

Reviewed By: dreiss

fbshipit-source-id: f0f68dd
