<commit_before>#!/usr/bin/env bash
# ----------------------------------------------------------------------------
# Uncomment the next line to enable debug
# set -x
#
# $1 -> parameter with the path of the .app bundle

## CODE BEGIN  #############################################################

echo Start: $(date)

# Exits if the the app path was not informed
if [ -z $1 ]; then
  echo "The first parameter must be the app path"
  exit 1
fi

# Reads the parameter file
while read line
do
  # Ignoring all comments
  echo $line | grep -q "^#" && continue

  # Reading the informations of the device in the devices file
  target="$(echo $line | cut -d'|' -f1)"
  endpoint="$(echo $line | cut -d'|' -f2)"
  name="$(echo $line | cut -d'|' -f3)"

  # Cleaning the previous reports folder and ensuring its existence
  rm -rf "$WORKSPACE/reports/$name" &> /dev/null
  mkdir -p "$WORKSPACE/reports/$name" &> /dev/null

  # Navigating to the tests root folder
  cd "$WORKSPACE"

  # Executing calabash for the device
  APP_BUNDLE_PATH="$1" DEVICE_TARGET="$target" DEVICE_ENDPOINT="$endpoint" SCREENSHOT_PATH="$WORKSPACE/reports/$name/" cucumber -p ios --format 'Calabash::Formatters::Html' --out "$WORKSPACE/reports/$name/reports.html"

done < config/scripts/ios/devices

echo End: $(date)
echo 'Bye!'
## CODE END  #############################################################<commit_msg>Added space trim on the run_tests_all_devices script<commit_after>#!/usr/bin/env bash
# ----------------------------------------------------------------------------
# Uncomment the next line to enable debug
# set -x
#
# $1 -> parameter with the path of the .app bundle

## CODE BEGIN  #############################################################

echo Start: $(date)

# Exits if the the app path was not informed
if [ -z $1 ]; then
  echo "The first parameter must be the app path"
  exit 1
fi

# Reads the parameter file
while read line
do
  # Ignoring all comments
  echo $line | grep -q "^#" && continue

  # Reading the informations of the device in the devices file
  # Any of this variable can contain spaces any kind of spaces, so we erase then off
  target="$(echo $line | cut -d'|' -f1 | tr -d ' ')"
  endpoint="$(echo $line | cut -d'|' -f2 | tr -d ' ')"
  name="$(echo $line | cut -d'|' -f3 | tr -d ' ')"

  # Cleaning the previous reports folder and ensuring its existence
  rm -rf "$WORKSPACE/reports/$name" &> /dev/null
  mkdir -p "$WORKSPACE/reports/$name" &> /dev/null

  # Navigating to the tests root folder
  cd "$WORKSPACE"

  # Executing calabash for the device
  APP_BUNDLE_PATH="$1" DEVICE_TARGET="$target" DEVICE_ENDPOINT="$endpoint" SCREENSHOT_PATH="$WORKSPACE/reports/$name/" cucumber -p ios --format 'Calabash::Formatters::Html' --out "$WORKSPACE/reports/$name/reports.html"

done < config/scripts/ios/devices

echo End: $(date)
echo 'Bye!'
## CODE END  #############################################################
{'fraction_non_alphanumeric': 0.25170998632010944, 'fraction_numerical': 0.0047879616963064295, 'mean_word_length': 3.2025862068965516, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1788139', 'n_tokens_mistral': 906, 'n_tokens_neox': 860, 'n_words': 310}