2015-12-04 12:39:54 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Runs test images
|
|
|
|
|
|
|
|
echo "*** Running unit tests..."
|
2015-11-20 01:08:38 -08:00
|
|
|
|
2015-12-03 07:11:33 -08:00
|
|
|
# Remove previous test results
|
|
|
|
rm _results/*.txt
|
|
|
|
|
|
|
|
# How long we shall wait for each test to conclude
|
2015-12-03 18:50:20 -08:00
|
|
|
export netcon_test_wait_time=60s
|
2015-12-03 07:11:33 -08:00
|
|
|
|
|
|
|
# Test structure, in later releases more complex multi-party scripts will be included
|
2015-12-04 15:39:35 -08:00
|
|
|
export test_script=_two_party_test.sh
|
2015-12-03 07:11:33 -08:00
|
|
|
|
|
|
|
# Iterate over all depth=2 (relatively-speaking) directories and perform each test
|
|
|
|
find . -mindepth 2 -maxdepth 2 -type d | while read testdir; do
|
2015-12-04 12:39:54 -08:00
|
|
|
|
2015-12-06 17:55:48 -08:00
|
|
|
if [[ $testdir != *$1* ]]
|
|
|
|
then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
2015-12-06 22:37:23 -08:00
|
|
|
echo "*** Testing: '$testdir'..."
|
|
|
|
rm _results/*.tmp
|
|
|
|
|
2015-12-04 12:39:54 -08:00
|
|
|
# Stage scripts
|
|
|
|
cp $test_script $testdir/$test_script
|
2015-12-03 07:11:33 -08:00
|
|
|
cd $testdir
|
2015-12-04 12:39:54 -08:00
|
|
|
|
|
|
|
# Run test
|
|
|
|
./$test_script
|
|
|
|
rm $test_script
|
|
|
|
|
2015-12-03 07:11:33 -08:00
|
|
|
cd ../../
|
2015-12-04 12:39:54 -08:00
|
|
|
done
|
|
|
|
|
2015-12-06 17:55:48 -08:00
|
|
|
echo "*** Done"
|