<commit_before>#!/bin/sh

set -eux
env

container="${PLATFORM}"
build_dir="${HOME}/ansible"

test_target="${TARGET:-}"
test_flags="${TEST_FLAGS:-}"

# Force ansible color output by default.
# To disable color force mode use FORCE_COLOR=0
force_color="${FORCE_COLOR:-1}"

# FIXME: these tests fail
skip_tags='test_unarchive,test_service,test_postgresql,test_mysql_db,test_mysql_user,test_mysql_variables,test_uri,test_get_url'

cd ~/

make="make"

if [ "${container}" = "freebsd" ]; then
    make="gmake"

    pkg install -y curl

    if [ ! -f bootstrap.sh ]; then
        curl "https://raw.githubusercontent.com/mattclay/ansible-hacking/master/bootstrap.sh" -o bootstrap.sh
    fi

    chmod +x bootstrap.sh
    ./bootstrap.sh pip -y -q

    # tests require these packages
    # TODO: bootstrap.sh should be capable of installing these
    pkg install -y \
        bash \
        devel/ruby-gems \
        mercurial \
        rsync \
        ruby \
        subversion \
        sudo \
        zip
fi

# TODO: bootstrap.sh should install these
pip install \
    junit-xml \
    virtualenv \
    jmespath

# Tests assume loopback addresses other than 127.0.0.1 will work.
# Add aliases for loopback addresses used by tests.

for i in 3 4 254; do
    ifconfig lo0 alias "127.0.0.${i}" up
done

ifconfig lo0

# Since tests run as root, we also need to be able to ssh to localhost as root.<commit_msg>Enable unarchive tests for OS X and FreeBSD. (#17789)<commit_after>#!/bin/sh

set -eux
env

container="${PLATFORM}"
build_dir="${HOME}/ansible"

test_target="${TARGET:-}"
test_flags="${TEST_FLAGS:-}"

# Force ansible color output by default.
# To disable color force mode use FORCE_COLOR=0
force_color="${FORCE_COLOR:-1}"

# FIXME: these tests fail
skip_tags='test_service,test_postgresql,test_mysql_db,test_mysql_user,test_mysql_variables,test_uri,test_get_url'

cd ~/

make="make"

if [ "${container}" = "freebsd" ]; then
    make="gmake"

    pkg install -y curl

    if [ ! -f bootstrap.sh ]; then
        curl "https://raw.githubusercontent.com/mattclay/ansible-hacking/master/bootstrap.sh" -o bootstrap.sh
    fi

    chmod +x bootstrap.sh
    ./bootstrap.sh pip -y -q

    # tests require these packages
    # TODO: bootstrap.sh should be capable of installing these
    pkg install -y \
        bash \
        devel/ruby-gems \
        gtar \
        mercurial \
        rsync \
        ruby \
        subversion \
        sudo \
        zip
fi

# TODO: bootstrap.sh should install these
pip install \
    junit-xml \
    virtualenv \
    jmespath

# Tests assume loopback addresses other than 127.0.0.1 will work.
# Add aliases for loopback addresses used by tests.

for i in 3 4 254; do
    ifconfig lo0 alias "127.0.0.${i}" up
done

ifconfig lo0

# Since tests run as root, we also need to be able to ssh to localhost as root.
{'fraction_non_alphanumeric': 0.10726887791107975, 'fraction_numerical': 0.01587861679604799, 'mean_word_length': 2.825910931174089, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 2, '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': '3821661', 'n_tokens_mistral': 991, 'n_tokens_neox': 918, 'n_words': 282}