<commit_before>#!/bin/bash
set -eu
: ${SCRIPTS=$(readlink -f $(dirname $0))}
new_juju=$(find $new_juju_dir -name juju)
export JUJU_HOME=$HOME/cloud-city
build_id=${JOB_NAME}-${BUILD_NUMBER}
s3cfg=$JUJU_HOME/juju-qa.s3cfg
s3base=s3://juju-qa-data/industrial-test/${build_id}
if [ "$new_agent_url" != "" ]; then
  extra_args="--new-agent-url $new_agent_url"
else
  extra_args=""
fi
set -x
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
  $environment metadata.json
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
  $suite --attempts $attempts --json-file results.json $extra_args
s3cmd -c $s3cfg put results.json $s3base-results.json<commit_msg>Add --old-stable parameter to run-reliability-test.<commit_after>#!/bin/bash
set -eu
: ${SCRIPTS=$(readlink -f $(dirname $0))}
new_juju=$(find $new_juju_dir -name juju)
old_stable_juju=$(find $old_stable_juju_dir -name juju)

export JUJU_HOME=$HOME/cloud-city
build_id=${JOB_NAME}-${BUILD_NUMBER}
s3cfg=$JUJU_HOME/juju-qa.s3cfg
s3base=s3://juju-qa-data/industrial-test/${build_id}
if [ "$new_agent_url" != "" ]; then
  extra_args="--new-agent-url $new_agent_url"
else
  extra_args=""
fi
set -x
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
  $environment metadata.json
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
  --old-stable $old_stable_juju $suite --attempts $attempts \
  --json-file results.json $extra_args
s3cmd -c $s3cfg put results.json $s3base-results.json
{'fraction_non_alphanumeric': 0.15192190359975594, 'fraction_numerical': 0.017083587553386213, 'mean_word_length': 5.259541984732825, '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': '631457', 'n_tokens_mistral': 689, 'n_tokens_neox': 660, 'n_words': 121}