blob: 03e860115c738b6643d078162f0e4448e3d20b52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
# Runs test images
echo "*** Running unit tests..."
# Remove previous test results
rm _results/*.txt
# How long we shall wait for each test to conclude
export netcon_test_wait_time=60s
# Test structure, in later releases more complex multi-party scripts will be included
export test_script=_two_party_test.sh
# Iterate over all depth=2 (relatively-speaking) directories and perform each test
find . -mindepth 2 -maxdepth 2 -type d | while read testdir; do
if [[ $testdir != *$1* ]]
then
continue
fi
echo "*** Testing: '$testdir'..."
rm _results/*.tmp
# Stage scripts
cp $test_script $testdir/$test_script
cd $testdir
# Run test
./$test_script
rm $test_script
cd ../../
done
echo "*** Done"
|