<commit_before>#!/usr/bin/env bash

set -o pipefail
set -o errexit
set -o nounset
# set -o xtrace

# Set magic variables for current FILE & DIR
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"
__root="$(cd "$(dirname "${__dir}")" && pwd)"

scenarios="${1:-$(ls ${__dir}/scenario/|egrep -v ^prepare$)}"

__sysTmpDir="${TMPDIR:-/tmp}"
__sysTmpDir="${__sysTmpDir%/}" # <-- remove trailing slash on macosx
__accptstTmpDir="${__sysTmpDir}/accptst"
mkdir -p "${__accptstTmpDir}"

if [[ "${OSTYPE}" == "darwin"* ]]; then
  cmdSed=gsed
else
  cmdSed=sed
fi

if [[ "${OSTYPE}" == "darwin"* ]]; then
  cmdTimeout="gtimeout --kill-after=6m 5m"
else
  cmdTimeout="timeout --kill-after=6m 5m"
fi

__node="$(which node)"
<commit_msg>b3bp dogfooding for acceptance.sh<commit_after>#!/usr/bin/env bash
# This file:
#
#  - Executes one (or all) test scenarios
#  - Replaces dynamic things like hostnames, IPs, dates, etc
#  - Optionally saves the results as fixtures, that later runs will be compared against
#
# Usage:
#
#  ./deploy.sh
#
# Based on a template by BASH3 Boilerplate v2.0.0
# Copyright (c) 2013 <NAME> and contributors
# http://bash3boilerplate.sh/#authors

# Exit on error. Append || true if you expect an error.
set -o errexit
# Exit on error inside any functions or subshells.
set -o errtrace
# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR
set -o nounset
# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip`
set -o pipefail
# Turn on traces, useful while debugging but commented out by default
# set -o xtrace

# Set magic variables for current file, directory, os, etc.
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"
__root="$(cd "$(dirname "${__dir}")" && pwd)"
__os="Linux"
if [[ "${OSTYPE:-}" == "darwin"* ]]; then
  __os="OSX"
fi


scenarios="${1:-$(ls ${__dir}/scenario/|egrep -v ^prepare$)}"

__sysTmpDir="${TMPDIR:-/tmp}"
__sysTmpDir="${__sysTmpDir%/}" # <-- remove trailing slash on macosx
__accptstTmpDir="${__sysTmpDir}/accptst"
mkdir -p "${__accptstTmpDir}"

if [[ "${OSTYPE}" == "darwin"* ]]; then
  cmdSed=gsed
else
  cmdSed=sed
fi

if [[ "${OSTYPE}" == "darwin"* ]]; then
  cmdTimeout="gtimeout --kill-after=6m 5m"
else
  cmdTimeout="timeout --kill-after=6m 5m"
fi

__node="$(which node)"

{'fraction_non_alphanumeric': 0.18854805725971371, 'fraction_numerical': 0.0098159509202454, 'mean_word_length': 4.8238095238095235, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '7443138', 'n_tokens_mistral': 948, 'n_tokens_neox': 911, 'n_words': 259}