Sha256: c7333035b1bcd68c40ec7926cc4584f25cc5fa8b277d817b1cd26a40c7ef6453

Contents?: true

Size: 1.69 KB

Versions: 16

Compression:

Stored size: 1.69 KB

Contents

#!/bin/bash
# ----------------------------------------------------------------------------
# Uncomment the next line to enable debug
# set -x
#
# $1 -> parameter with the name of the apk
# $2 -> parameter to indicates the tapume to run. Can be null and can have other 2 values: must or should

## CODE BEGIN  #############################################################
[ $# -lt 1 ] && echo "Wrong number of parameters." && exit 1

# Counting the number of lines returned from the command adb devices
# This command will return at least 2 as result, because of one header line and one empty line at end
# So if the result is less than or equal 2, it means that there are no devices or emulators connected
number_of_devices=$(adb devices | wc -l)
[ $number_of_devices -le 2 ] && echo "There are no devices or emulators connected!" && exit 1

echo Inicio da execução: $(date)

# Creating the reports folder for the html format
reports_path="$WORKSPACE/reports-cal"
mkdir $reports_path

for device in $(adb devices | grep "device$" | cut -f 1)
do
  cd $WORKSPACE
  # Creates the reports folder
  mkdir "$reports_path"/"$device"

  {
      ADB_DEVICE_ARG=$device calabash-android run $1 -p android SCREENSHOT_PATH="$reports_path"/"$device"/ -f 'Calabash::Formatters::Html' -o "$reports_path"/"$device"/reports.html -f junit -o "$reports_path"/"$device"
      # Calabash has a problem with images relative path, the command above will replace all the images path on the
      # html report file to be a relative path
      sed -i.bak 's|'"$reports_path"/"$device"/'||g' "$reports_path"/"$device"/reports.html
  }&

done
wait

echo Fim da execução: $(date)
## CODE END  #############################################################

Version data entries

16 entries across 11 versions & 2 rubygems

Version Path
sunomono-1.0.6 lib/skeleton_calabash/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.6 lib/skeleton_appium/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.5 lib/skeleton_calabash/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.5 lib/skeleton_appium/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.4 lib/skeleton_appium/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.4 lib/skeleton_calabash/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.3 lib/skeleton_appium/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.3 lib/skeleton_calabash/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.0 lib/skeleton_calabash/config/scripts/android/run_tests_all_devices.sh
sunomono-1.0.0 lib/skeleton_appium/config/scripts/android/run_tests_all_devices.sh
sunomono-0.3.1 lib/skeleton/config/scripts/android/run_tests_all_devices.sh
sunomono-0.3.0 lib/skeleton/config/scripts/android/run_tests_all_devices.sh
sunomono-0.2.0.pre lib/skeleton/config/scripts/android/run_tests_all_devices.sh
cs-bdd-0.1.9 lib/skeleton/config/scripts/android/run_tests_all_devices.sh
cs-bdd-0.1.8 lib/skeleton/config/scripts/android/run_tests_all_devices.sh
cs-bdd-0.1.7 lib/skeleton/config/scripts/android/run_tests_all_devices.sh