<commit_before>#!/bin/bash
# Abort on Error
set -e -o pipefail

export PING_SLEEP=30s
export WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export BUILD_OUTPUT=$HOME/build.log
export TEST_OUTPUT=$HOME/test.log
export OP=$1

touch $BUILD_OUTPUT
touch $TEST_OUTPUT

echo "Build/test logs will be uploaded to: https://s3-eu-west-1.amazonaws.com/hammerspoontravisartifacts/index.html?prefix=logs/${TRAVIS_BUILD_NUMBER}/"

if [ "${OP}" == "build" ]; then
    export OUTPUT_FILE="${BUILD_OUTPUT}"
    export XCODE_ARGS="build build-for-testing GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES"
elif [ "${OP}" == "test" ]; then
    ASAN_LIB_PATH=$(find /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/ -name libclang_rt.asan_osx_dynamic.dylib)
    export DYLD_INSERT_LIBRARIES="${ASAN_LIB_PATH}"
    export OUTPUT_FILE="${TEST_OUTPUT}"
    export XCODE_ARGS="test-without-building"
else
    echo "Unknown command: ${OP}"<commit_msg>Ensure we always produce a codecov.log so the artifact uploader doesn't fail<commit_after>#!/bin/bash
# Abort on Error
set -e -o pipefail

export PING_SLEEP=30s
export WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export BUILD_OUTPUT=$HOME/build.log
export TEST_OUTPUT=$HOME/test.log
export OP=$1

touch $BUILD_OUTPUT
touch $TEST_OUTPUT
touch $HOME/codecov.log

echo "Build/test logs will be uploaded to: https://s3-eu-west-1.amazonaws.com/hammerspoontravisartifacts/index.html?prefix=logs/${TRAVIS_BUILD_NUMBER}/"

if [ "${OP}" == "build" ]; then
    export OUTPUT_FILE="${BUILD_OUTPUT}"
    export XCODE_ARGS="build build-for-testing GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES"
elif [ "${OP}" == "test" ]; then
    ASAN_LIB_PATH=$(find /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/ -name libclang_rt.asan_osx_dynamic.dylib)
    export DYLD_INSERT_LIBRARIES="${ASAN_LIB_PATH}"
    export OUTPUT_FILE="${TEST_OUTPUT}"
    export XCODE_ARGS="test-without-building"
else
    echo "Unknown command: ${OP}"
{'fraction_non_alphanumeric': 0.1393247741321921, 'fraction_numerical': 0.005706134094151213, 'mean_word_length': 5.809061488673139, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4379614', 'n_tokens_mistral': 783, 'n_tokens_neox': 745, 'n_words': 140}