<commit_before>#! /bin/bash
set -u

TEST_DIR=`readlink -f "$1"`
TEST_NAME=`basename $TEST_DIR`
IMAGE_TAG="apa"

SUAB_BINARY="`dirname $0`/../../build/suab"
TEST_CMD="$SUAB_BINARY -d $IMAGE_TAG -m http://nowhere:80 -s magic:0"

echo "Running test $TEST_NAME"

## RUN TEST
docker build --tag $IMAGE_TAG $TEST_DIR  > /dev/null || exit 1
$TEST_CMD

## CHECK OUTPUT
TEST_EXIT_CODE=$?
EXPECTED_EXIT_CODE=0
if [[ -e $TEST_DIR/expected-exit-code ]]; then
  EXPECTED_EXIT_CODE=`cat $TEST_DIR/expected-exit-code`
fi

#docker rmi $IMAGE_TAG > /dev/null || true<commit_msg>Changed the regression test command to work with the new client defaults<commit_after>#! /bin/bash
set -u

TEST_DIR=`readlink -f "$1"`
TEST_NAME=`basename $TEST_DIR`
IMAGE_TAG="apa"

SUAB_BINARY="`dirname $0`/../../build/suab"
TEST_CMD="$SUAB_BINARY -d $IMAGE_TAG"

echo "Running test $TEST_NAME"

## RUN TEST
docker build --tag $IMAGE_TAG $TEST_DIR  > /dev/null || exit 1
$TEST_CMD

## CHECK OUTPUT
TEST_EXIT_CODE=$?
EXPECTED_EXIT_CODE=0
if [[ -e $TEST_DIR/expected-exit-code ]]; then
  EXPECTED_EXIT_CODE=`cat $TEST_DIR/expected-exit-code`
fi

#docker rmi $IMAGE_TAG > /dev/null || true
{'fraction_non_alphanumeric': 0.15752828546562228, 'fraction_numerical': 0.009573542210617928, 'mean_word_length': 4.86734693877551, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5609326', 'n_tokens_mistral': 465, 'n_tokens_neox': 456, 'n_words': 106}