Skip to content

Commit

Permalink
use some GHA groups
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 16, 2023
1 parent 72e73b5 commit 4146088
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tests/lib_ci.sh
Expand Up @@ -9,12 +9,23 @@ fail() {
exit 1
}

function begingroup {
echo "::group::$@"
set -x
}

function endgroup {
set +x
echo "::endgroup"
}

setup_container() {
/usr/bin/env python --version
# prepare lxc container template
begingroup "Preparing LXC container template"
if ! $WORKSPACE/tests/tunneldigger.py --setup bionic ; then
fail "While compiling the setup"
fi
endgroup
}

test_client_compile() {
Expand All @@ -39,21 +50,25 @@ test_nose() {
local new_rev=$(git rev-parse $2)

cd $WORKSPACE/tests/
echo && echo "## Old client, new server" && echo
begingroup "Old client, new server"
if ! CLIENT_REV=$old_rev SERVER_REV=$new_rev nosetests3 --nocapture test_nose.py ; then
fail "while running test_nose cli <> server.\nclient: '$old_rev'\nserver: '$new_rev'"
fi
echo && echo "## Old server, new client" && echo
endgroup
begingroup "Old server, new client"
if ! CLIENT_REV=$new_rev SERVER_REV=$old_rev nosetests3 --nocapture test_nose.py ; then
fail "while running test_nose cli <> server.\nclient: '$new_rev'\nserver: '$old_rev'"
fi
endgroup
}

test_usage() {
local new_rev=$(git rev-parse $1)

cd $WORKSPACE/tests/
begingroup "Running usage test"
if ! CLIENT_REV=$new_rev nosetests3 --nocapture test_usage.py ; then
fail "while running usage tests."
fi
endgroup
}

0 comments on commit 4146088

Please sign in to comment.