<commit_before>#!/bin/bash -ex

function mtime() {
    stat -c %Y $1
}

# Go to top of blueprint tree
TOP=$(dirname ${BASH_SOURCE[0]})/..
cd ${TOP}

rm -rf out.test
mkdir out.test

rm -rf src.test
mkdir src.test
cp -r tests/test_tree src.test/test_tree
ln -s ../.. src.test/test_tree/blueprint

cd out.test
export SRCDIR=../src.test/test_tree
export BLUEPRINTDIR=${SRCDIR}/blueprint
${SRCDIR}/blueprint/bootstrap.bash $@
./blueprint.bash

OLDTIME_BOOTSTRAP=$(mtime .bootstrap/build.ninja)
OLDTIME=$(mtime build.ninja)

sleep 2
./blueprint.bash

if [ ${OLDTIME} != $(mtime build.ninja) ]; then
    echo "unnecessary build.ninja regeneration for null build" >&2
    exit 1
fi
<commit_msg>Move generated Travis test dirs outside the tree<commit_after>#!/bin/bash -ex

function mtime() {
    stat -c %Y $1
}

# Go to top of blueprint tree
cd $(dirname ${BASH_SOURCE[0]})/..
TOP=${PWD}

export TEMPDIR=$(mktemp -d -t blueprint.test.XXX)

function cleanup() {
    cd "${TOP}"
    rm -rf "${TEMPDIR}"
}
trap cleanup EXIT

export OUTDIR="${TEMPDIR}/out"
mkdir "${OUTDIR}"

export SRCDIR="${TEMPDIR}/src"
cp -r tests/test_tree "${SRCDIR}"
ln -s "${TOP}" "${SRCDIR}/blueprint"

cd "${OUTDIR}"
export BLUEPRINTDIR=${SRCDIR}/blueprint
${SRCDIR}/blueprint/bootstrap.bash $@
./blueprint.bash

OLDTIME_BOOTSTRAP=$(mtime .bootstrap/build.ninja)
OLDTIME=$(mtime build.ninja)

sleep 2
./blueprint.bash

if [ ${OLDTIME} != $(mtime build.ninja) ]; then
    echo "unnecessary build.ninja regeneration for null build" >&2
    exit 1
fi

{'fraction_non_alphanumeric': 0.16512549537648613, 'fraction_numerical': 0.0066050198150594455, 'mean_word_length': 4.066889632107023, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7286944', 'n_tokens_mistral': 589, 'n_tokens_neox': 568, 'n_words': 149}