<commit_before>#!/bin/bash

# This must be run in a directory created by install.sh.

# Set up the linux host and its environment and get it started.
scripts/setup.sh
scripts/start.sh

echo "Waiting for the Linux host to start"
sleep 5

# Set up the key server.
bin/keynegoserver -password=<PASSWORD> &

# Set up the RollbackMaster and the ResourceMaster under the Tao.
scripts/host.sh ./bin/rollbackserver -hostconfig=tao.config
scripts/host.sh ./bin/fileserver -hostconfig=tao.config

# Create a user and start the test client.
bin/tao_admin -newuserkey -common_name="jlm" -pass=<PASSWORD>
scripts/host.sh ./bin/fileclient -hostconfig=tao.config

<commit_msg>Port fileproxy to use tao_launch.<commit_after>#!/bin/bash

t=`mktemp /tmp/loc.XXXXXXXX`
linux_host -tmppath=$t &
status=$?
hostpid=$!
if [ "$status" != "0" ]; then
	echo "Couldn't start the linux_host in a temporary directory"
	exit 1
fi

echo "Waiting for linux_host to start"
sleep 2

# Go to the temp directory set up by linux_host.
DIR=`cat $t`
cd ${DIR}

# Set up the key server.
${GOPATH}/bin/keynegoserver -password=<PASSWORD> &
knpid=$!
echo "Waiting for the keynegoserver to start"
sleep 2

tao_launch -sock ${DIR}/linux_tao_host/admin_socket -- ${GOPATH}/bin/rollbackserver -hostconfig=${DIR}/tao.config -rollbackserver_files=${DIR}/rollbackserver_files
echo "Waiting for the rollback server to start"
sleep 2

tao_launch -sock ${DIR}/linux_tao_host/admin_socket -- ${GOPATH}/bin/fileserver -hostconfig=${DIR}/tao.config -fileserver_files=${DIR}/fileserver_files
echo "Waiting for the fileserver to start"
sleep 2

# Create a user and start the test client
${GOPATH}/bin/tao_admin -newuserkey -common_name="jlm" -pass=<PASSWORD>

tao_launch -sock ${DIR}/linux_tao_host/admin_socket -- ${GOPATH}/bin/fileclient -hostconfig=${DIR}/tao.config -fileclient_files=${DIR}/fileclient_files -usercreds=${DIR}/usercreds

echo "Waiting for the tests to finish"
sleep 5

echo "Cleaning up remaining programs"
pids=`tao_launch -sock ${DIR}/linux_tao_host/admin_socket -operation=list | cut -d' ' -f1 | head -n -1 | sed 's/^pid=//g'`
for p in $pids; do
	kill $p
done
kill $knpid $hostpid

{'fraction_non_alphanumeric': 0.12488350419384903, 'fraction_numerical': 0.004659832246039142, 'mean_word_length': 4.771505376344086, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '75360', 'n_tokens_mistral': 779, 'n_tokens_neox': 747, 'n_words': 225}