summaryrefslogtreecommitdiff
path: root/netcon/docker-test/build_tests.sh
blob: f360124b607f72e8fdda18ded0a9d98d50bf9e65 (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
#!/bin/bash

# Merely BUILDS test images

# Remove previous test results
rm _results/*.txt 

# How long we shall wait for each test to conclude
export netcon_test_wait_time=60s

export image_build_script=_build_single_image.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 "*** Building: '$testdir'..."
    rm _results/*.tmp

    # Stage scripts
    cp $image_build_script $testdir/$image_build_script
    cd $testdir

    # Build test docker images
    ./$image_build_script
    rm $image_build_script

    cd ../../
done