<commit_before>#!/bin/bash

set -euo pipefail

INTEGRATIONTESTS=1
UNITTESTS=1
DEPCHECK=1
GEN_UNIT=0
GEN_INT=0
SKIP_PIP=0
HELP=0
HWTESTS=${HWTESTS:-0}
PY_FILES_CHANGED=${PY_FILES_CHANGED:-""}


if [ -z "${FAUCET_TESTS:-}" ]; then
  # If FAUCET_TESTS env var isn't set read arguments from argv
  FAUCET_TESTS="$*"
fi

# Shorten long form arguments to make parsing easier
FAUCET_TESTS_SHORTENED=""
for opt in ${FAUCET_TESTS}; do
  case "${opt}" in
    --integration)
      FAUCET_TESTS_SHORTENED+=" -i"
      ;;
    --nocheck)
      FAUCET_TESTS_SHORTENED+=" -n"
      ;;
    *)
      FAUCET_TESTS_SHORTENED+=" ${opt}"
      ;;
  esac
done

PARAMS=""

# Parse options, some are used by this script, some are
# passed onto mininet_main.py & clib_mininet_main.py
for opt in ${FAUCET_TESTS_SHORTENED}; do
  case "${opt}" in
    --help)
      HELP=1
      ;;
    --generative_unit)
      GEN_UNIT=1
      UNITTESTS=0
      DEPCHECK=0
      INTEGRATIONTESTS=0
      PARAMS+=" ${opt}"
      ;;
    --generative_integration)
      GEN_INT=1
      UNITTESTS=0
      DEPCHECK=0
      INTEGRATIONTESTS=0
      PARAMS+=" ${opt}"
      ;;
    --*)
      PARAMS+=" ${opt}"
      ;;
    -*)
      for (( i=1; i<${#opt}; i++ )); do
        case "${opt:$i:1}" in
          i)
            # run only integration tests
            UNITTESTS=0
            DEPCHECK=0
            PARAMS+=" -${opt:$i:1}"
            ;;
          n)
            # skip code check
            DEPCHECK=0
            PARAMS+=" -${opt:$i:1}"
            ;;
          u)
            # skip unit tests
            UNITTESTS=1
            DEPCHECK=0
            INTEGRATIONTESTS=0
            ;;
          z)
            # Skip pip installer
            echo "Option set to assume environment is set up."
            SKIP_PIP=1<commit_msg>Revert test script changes<commit_after>#!/bin/bash

set -euo pipefail

INTEGRATIONTESTS=1
UNITTESTS=1
DEPCHECK=1
GEN_UNIT=0
GEN_INT=0
SKIP_PIP=0
HELP=0
HWTESTS=${HWTESTS:-0}
PY_FILES_CHANGED=${PY_FILES_CHANGED:-""}


if [ -z "${FAUCET_TESTS:-}" ]; then
  # If FAUCET_TESTS env var isn't set read arguments from argv
  FAUCET_TESTS="$*"
fi

# Shorten long form arguments to make parsing easier
FAUCET_TESTS_SHORTENED=""
for opt in ${FAUCET_TESTS}; do
  case "${opt}" in
    --integration)
      FAUCET_TESTS_SHORTENED+=" -i"
      ;;
    --nocheck)
      FAUCET_TESTS_SHORTENED+=" -n"
      ;;
    *)
      FAUCET_TESTS_SHORTENED+=" ${opt}"
      ;;
  esac
done

PARAMS=""

# Parse options, some are used by this script, some are
# passed onto mininet_main.py & clib_mininet_main.py
for opt in ${FAUCET_TESTS_SHORTENED}; do
  case "${opt}" in
    --help)
      HELP=1
      ;;
    --generative_unit)
      GEN_UNIT=1
      UNITTESTS=0
      DEPCHECK=0
      INTEGRATIONTESTS=0
      PARAMS+=" ${opt}"
      ;;
    --generative_integration)
      GEN_INT=1
      UNITTESTS=0
      DEPCHECK=0
      INTEGRATIONTESTS=0
      PARAMS+=" ${opt}"
      ;;
    --*)
      PARAMS+=" ${opt}"
      ;;
    -*)
      for (( i=1; i<${#opt}; i++ )); do
        case "${opt:$i:1}" in
          i)
            # run only integration tests
            UNITTESTS=0
            DEPCHECK=0
            PARAMS+=" -${opt:$i:1}"
            ;;
          n)
            # skip code check
            DEPCHECK=0
            PARAMS+=" -${opt:$i:1}"
            ;;
          u)
            # skip unit tests
            UNITTESTS=0
            ;;
          z)
            # Skip pip installer
            echo "Option set to assume environment is set up."
            SKIP_PIP=1
{'fraction_non_alphanumeric': 0.13096246119108101, 'fraction_numerical': 0.015241320914479255, 'mean_word_length': 1.8488745980707395, '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': '5172231', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1276, 'n_words': 284}