<commit_before>#!/bin/bash

exit_code=0

# We run tests for each package separately, otherwise they can interfere with each other
while read package; do
  # Skipping empty lines
  [ -z "$package" ] && continue
  # Skipping comments
  if [[ "$package" == \#* ]]; then
    continue
  fi
  echo "Testing $package"
  if [[ "$package" == "meteor-file" ]]; then
    # A special case for meteor-file which requires Blob polyfill on PhantomJS
    PACKAGES="blob;$package" make test
  else
    PACKAGES="$package" make test
  fi
  if [ $? -ne 0 ]; then
    exit_code=$?
  fi
  # Cleanup
  killall -KILL node
done < .meteor/packages

# Exit
exit $exit_code<commit_msg>Correctly detect errors in tests.<commit_after>#!/bin/bash

EXIT_CODE=0

# We run tests for each package separately, otherwise they can interfere with each other
while read package; do
  # Skipping empty lines
  [ -z "$package" ] && continue
  # Skipping comments
  if [[ "$package" == \#* ]]; then
    continue
  fi
  echo "Testing $package"
  if [[ "$package" == "meteor-file" ]]; then
    # A special case for meteor-file which requires Blob polyfill on PhantomJS
    PACKAGES="blob;$package" make test
    exit_code=$?
  else
    PACKAGES="$package" make test
    exit_code=$?
  fi
  if [ $exit_code -ne 0 ]; then
    EXIT_CODE=$exit_code
  fi
  # Cleanup
  killall -KILL node
done < .meteor/packages

# Exit
exit $EXIT_CODE
{'fraction_non_alphanumeric': 0.11471861471861472, 'fraction_numerical': 0.002886002886002886, 'mean_word_length': 3.334375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5662706', 'n_tokens_mistral': 480, 'n_tokens_neox': 448, 'n_words': 154}