#!/bin/bash

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../lib"
export LD_LIBRARY_PATH
PATH="$PATH:."
export PATH


if [ $(id -u) = "0" ]
then
	echo "Running measurements under Scheduling Fifo with Priority 4.";
	echo "You will be preempted now and you will gain back control in";
	echo "about 29 minutes.";
	for i in 0 1 2 3 4 5 6 7 8 9;
	do
		echo "runnning measurements $i";
		./atprio 4 ./measurements.sh | tee measurements-$i.log;
	done
else
	for i in 0 1 2 3 4 5 6 7 8 9;
	do
		echo "runnning measurements $i";
		./measurements.sh | tee measurements-$i.log;
	done
fi
./evaluate | tee results.log
for i in 0 1 2 3 4 5 6 7 8 9;
do
	rm -f ./measurements-$i.log;
done
