<commit_before>#!/bin/bash

set -e

# Helper functions
# ==============================================================================
function print_info {
    printf "\e[0;34m$1\e[0m\n"
}
# ==============================================================================

# Set paths and files
# ==============================================================================
[ -z "$FILETREE_CI_BUILD_BASE" ] && FILETREE_CI_BUILD_BASE="$FILETREE_CI_HOME/_builds"
# ==============================================================================

# Determine Pharo download url
# ==============================================================================
case "$SMALLTALK" in
    "Pharo4.0")
        PHARO_GET_URL="get.pharo.org/40+vm"
        ;;
    "Pharo5.0")
        PHARO_GET_URL="get.pharo.org/50+vm"
        ;;
    *)
        print_error "Unknown Pharo version ${SMALLTALK}"
        exit 1
        ;;
esac
# ==============================================================================

# Prepare folders
# ==============================================================================
print_info "Preparing folders..."
[[ -d "$FILETREE_CI_BUILD_BASE" ]] || mkdir "$FILETREE_CI_BUILD_BASE"
pushd FILETREE_CI_BUILD_BASE
# ==============================================================================

# Prepare image and virtual machine
# ==============================================================================
print_info "Downloading Pharo image and vm..."
wget --quiet -O - ${PHARO_GET_URL} | bash
# ==============================================================================

# Load project and run tests
# ==============================================================================
print_info "Loading project..."
./pharo Pharo.image eval --save "
Metacello new 
    baseline: '${BASELINE}';
    repository: 'filetree://${PROJECT_HOME}';
    load.
"

print_info "Run tests..."
EXIT_STATUS=0
./pharo --vm-display-null Pharo.image test --fail-on-failure "${BASELINE}.*" 2>&1 || EXIT_STATUS=$?
# ==============================================================================
popd

exit $EXIT_STATUS
<commit_msg>Minor fix<commit_after>#!/bin/bash

set -e

# Helper functions
# ==============================================================================
function print_info {
    printf "\e[0;34m$1\e[0m\n"
}

function print_error {
    printf "\e[1;31m$1\e[0m\n"
}
# ==============================================================================

# Set paths and files
# ==============================================================================
[ -z "$FILETREE_CI_BUILD_BASE" ] && FILETREE_CI_BUILD_BASE="$FILETREE_CI_HOME/_builds"
# ==============================================================================

# Determine Pharo download url
# ==============================================================================
case "$SMALLTALK" in
    "Pharo4.0")
        PHARO_GET_URL="get.pharo.org/40+vm"
        ;;
    "Pharo5.0")
        PHARO_GET_URL="get.pharo.org/50+vm"
        ;;
    *)
        print_error "Unsupported Pharo version ${SMALLTALK}"
        exit 1
        ;;
esac
# ==============================================================================

# Prepare folders
# ==============================================================================
print_info "Preparing folders..."
[[ -d "$FILETREE_CI_BUILD_BASE" ]] || mkdir "$FILETREE_CI_BUILD_BASE"
pushd FILETREE_CI_BUILD_BASE
# ==============================================================================

# Prepare image and virtual machine
# ==============================================================================
print_info "Downloading Pharo image and vm..."
wget --quiet -O - ${PHARO_GET_URL} | bash
# ==============================================================================

# Load project and run tests
# ==============================================================================
print_info "Loading project..."
./pharo Pharo.image eval --save "
Metacello new 
    baseline: '${BASELINE}';
    repository: 'filetree://${PROJECT_HOME}';
    load.
"

print_info "Run tests..."
EXIT_STATUS=0
./pharo --vm-display-null Pharo.image test --fail-on-failure "${BASELINE}.*" 2>&1 || EXIT_STATUS=$?
# ==============================================================================
popd

exit $EXIT_STATUS

{'fraction_non_alphanumeric': 0.5188352207071875, 'fraction_numerical': 0.009013173099144903, 'mean_word_length': 6.261744966442953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7408429', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1007, 'n_words': 197}