Skip to content

Commit

Permalink
CI: typo fixes in scripting system. Also, original implementation was…
Browse files Browse the repository at this point in the history
… way too dependent on what directory it got invoked from; attempting to make it more resilient.

Signed-off-by: George Almasi <[email protected]>
  • Loading branch information
George Almasi authored and maugustosilva committed Jan 18, 2024
1 parent af881f0 commit bb4d5c8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
5 changes: 4 additions & 1 deletion ci/tests/1_simpletest/runtest.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash

bindir=$(dirname $(realpath $0))
cd ${bindir}/../../..

. ci/util/util_ao.sh

ao_build . || exit -1
ao_clean . || exit -1
ao_deploy . ${PWD}/ci/tests/1_simpletest/values.yml || exit -1
ao_deploy . ${bindir}/values.yml || exit -1
ao_wait . || exit -1
ao_simpletest . || exit -1
ao_clean .
5 changes: 4 additions & 1 deletion ci/tests/2_privilegedagent/runtest.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash

bindir=$(dirname $(realpath $0))
cd ${bindir}/../../..

. ci/util/util_ao.sh

ao_build . || exit -1
ao_clean . || exit -1
ao_deploy . ${PWD}/ci/tests/2_privilegedagent/values.yml || exit -1
ao_deploy . ${bindir}/values.yml || exit -1
ao_wait . || exit -1
ao_simpletest . || exit -1
ao_clean .
11 changes: 7 additions & 4 deletions ci/tests/runtests.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/bash

fullpath=$(realpath $0)
testdir=$(dirname $fullpath)
passed=0
failed=0
total=0
for test in `find tests -name runtest.sh -type f | sort`
for test in `find ${testdir} -name runtest.sh -type f | sort`
do
testdir=$(dirname ${test})
echo "RUNNING TEST: ${testdir}"
echo "---------------------"
testname=$(printf "%-20.20s" $(basename $(dirname $test)))
echo "+-----------------------------------+"
echo "| RUNNING TEST: ${testname}|"
echo "+-----------------------------------+"
if ${test}
then
passed=$((passed+1))
Expand Down

0 comments on commit bb4d5c8

Please sign in to comment.