<commit_before>#!/bin/bash 
# Run all tests and coverage checks. Called from Travis automatically, also
# suitable to run manually. See list of prerequisite packages in .travis.yml
cd $(realpath $(dirname $0))

FAILURE=0

run() {
  $* || FAILURE=1
}

doTest() {
  local dir=$1
  run go test -covermode=count -coverprofile=${dir}.coverprofile ./${dir}/
}

# Path for installed go package binaries. If yours is different, override with
# GOBIN=/my/path/to/bin ./test.sh
GOBIN=${GOBIN:-$HOME/gopath/bin}

# Ask vet to check in on things
run go vet -x ./...

[ -e $GOBIN/golint ] && run $GOBIN/golint ./...

# All the subdirectories
doTest analysis
doTest ca
#doTest cmd
doTest core
doTest jose
doTest log
doTest policy
doTest ra
doTest rpc
doTest sa
doTest test
doTest va
#doTest vendor
doTest wfe

[ -e $GOBIN/gover ] && run $GOBIN/gover

if [ "${TRAVIS}" == "true" ] ; then
  run $GOBIN/goveralls -coverprofile=gover.coverprofile -service=travis-ci
fi

exit ${FAILURE}
<commit_msg>Fix test.sh for running on boulder.<commit_after>#!/bin/bash 
# Run all tests and coverage checks. Called from Travis automatically, also
# suitable to run manually. See list of prerequisite packages in .travis.yml
if type realpath ; then
  cd $(realpath $(dirname $0))
fi

FAILURE=0

run() {
  $* || FAILURE=1
}

doTest() {
  local dir=$1
  run go test -covermode=count -coverprofile=${dir}.coverprofile ./${dir}/
}

# Path for installed go package binaries. If yours is different, override with
# GOBIN=/my/path/to/bin ./test.sh
GOBIN=${GOBIN:-$HOME/gopath/bin}

# Ask vet to check in on things
run go vet -x ./...

[ -e $GOBIN/golint ] && run $GOBIN/golint ./...

# All the subdirectories
doTest analysis
doTest ca
#doTest cmd
doTest core
doTest jose
doTest log
doTest policy
doTest ra
doTest rpc
doTest sa
doTest test
doTest va
#doTest vendor
doTest wfe

[ -e $GOBIN/gover ] && run $GOBIN/gover

if [ "${TRAVIS}" == "true" ] ; then
  run $GOBIN/goveralls -coverprofile=gover.coverprofile -service=travis-ci
fi

exit ${FAILURE}

{'fraction_non_alphanumeric': 0.1287916459472899, 'fraction_numerical': 0.003978120338140228, 'mean_word_length': 3.7677725118483414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2285028', 'n_tokens_mistral': 746, 'n_tokens_neox': 726, 'n_words': 240}