<commit_before>#!/bin/bash

echo -e ">>> Running Openstack Test"

INCLUDEOS_SRC=${INCLUDEOS_SRC-~/IncludeOS}
INCLUDEOS_TOOLS=${INCLUDEOS_TOOLS-~/includeos-tools}
NAME=pull_request_openstack

# Preemptive checks to see if there is openstack support
echo -e "\n\n>>> Checking if the required Openstack tools are installed"
errors=0
nova list > /dev/null 2>&1 || { echo "Nova is required"; errors=$((errors + 1)); }; 
$INCLUDEOS_TOOLS/openstack_control/openstack_control.py -h > /dev/null 2>&1 || { echo "openstack_control.py is required"; errors=$((errors + 1)); }; 
if [ $errors -gt 0 ]; then
	echo You do not have the required programs for running the Openstack test, Exiting
	exit 1
fi

# Create trap to ensure clean up
function clean {
	echo -e "\n\n>>> Performing clean up"
	$INCLUDEOS_TOOLS/openstack_control/openstack_control.py --delete_image $NAME
	$INCLUDEOS_TOOLS/openstack_control/openstack_control.py --delete $NAME
}
trap clean EXIT


# Upload image based on demo service
echo -e "\n\n>>> Creating IncludeOS instance on Openstack"
cd $INCLUDEOS_SRC/examples/demo_service
output=`make 2>&1` || echo "$output"

echo Uploading image to openstack
$INCLUDEOS_TOOLS/openstack_control/openstack_control.py --upload_image $NAME --image_path ./IncludeOS_Demo_Service.img

echo Starting instance
IP=$($INCLUDEOS_TOOLS/openstack_control/openstack_control.py --create pull_request_openstack --flavor includeos.nano --image $NAME)
echo Instance started on IP: $IP
sleep 1

IP="10.12.23.55"

# Test ping towards instance
echo -e "\n\n>>> Testing Host"
errors=0	# Keep track of errors
output=`ping -c 5 $IP 2>&1` || { echo -e "Ping:\n$output\n"; errors=$((errors + 1)); }; <commit_msg>Removed test strings<commit_after>#!/bin/bash

echo -e ">>> Running Openstack Test"

INCLUDEOS_SRC=${INCLUDEOS_SRC-~/IncludeOS}
INCLUDEOS_TOOLS=${INCLUDEOS_TOOLS-~/includeos-tools}
NAME=pull_request_openstack

# Preemptive checks to see if there is openstack support
echo -e "\n\n>>> Checking if the required Openstack tools are installed"
errors=0
nova list > /dev/null 2>&1 || { echo "Nova is required"; errors=$((errors + 1)); }; 
$INCLUDEOS_TOOLS/openstack_control/openstack_control.py -h > /dev/null 2>&1 || { echo "openstack_control.py is required"; errors=$((errors + 1)); }; 
if [ $errors -gt 0 ]; then
	echo You do not have the required programs for running the Openstack test, Exiting
	exit 1
fi

# Create trap to ensure clean up
function clean {
	echo -e "\n\n>>> Performing clean up"
	$INCLUDEOS_TOOLS/openstack_control/openstack_control.py --delete_image $NAME
	$INCLUDEOS_TOOLS/openstack_control/openstack_control.py --delete $NAME
}
trap clean EXIT


# Upload image based on demo service
echo -e "\n\n>>> Creating IncludeOS instance on Openstack"
cd $INCLUDEOS_SRC/examples/demo_service
output=`make 2>&1` || echo "$output"

echo Uploading image to openstack
$INCLUDEOS_TOOLS/openstack_control/openstack_control.py --upload_image $NAME --image_path ./IncludeOS_Demo_Service.img

echo Starting instance
IP=$($INCLUDEOS_TOOLS/openstack_control/openstack_control.py --create pull_request_openstack --flavor includeos.nano --image $NAME)
echo Instance started on IP: $IP
sleep 1

# Test ping towards instance
echo -e "\n\n>>> Testing Host"
errors=0	# Keep track of errors
output=`ping -c 5 $IP 2>&1` || { echo -e "Ping:\n$output\n"; errors=$((errors + 1)); }; 
{'fraction_non_alphanumeric': 0.12645392186101997, 'fraction_numerical': 0.012526096033402923, 'mean_word_length': 5.032374100719425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1170437', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1088, 'n_words': 337}