Skip to content

Commit

Permalink
ci-rp: fixed RP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtitov committed Aug 29, 2023
1 parent c719d3a commit 1938139
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
14 changes: 6 additions & 8 deletions ci/tests/rp-flux/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ mkdir -p .radical/pilot/configs
cp ci/tests/rp-flux/resource_flux.json .radical/pilot/configs/resource_flux.json
export RADICAL_CONFIG_USER_DIR=$(pwd)

if [[ ! -d "./radical.pilot" ]]; then
git clone -b v$rp_version --single-branch \
https://github.com/radical-cybertools/radical.pilot.git
fi
cd radical.pilot
wget "https://raw.githubusercontent.com/radical-cybertools/radical.pilot/v$rp_version/examples/00_getting_started.py"

echo '--- smoke test'
./examples/00_getting_started.py 'flux.localhost_flux'
radical-stack
./00_getting_started.py 'flux.localhost_flux'
ret=$?
echo "--- smoke test $ret"

rm -rf $HOME/radical.pilot.sandbox/*
SID=$(ls -rt | grep rp.session)
test -z "$SID" || rm -rf "$HOME/radical.pilot.sandbox/$SID"
echo '--- cleaned pilot sandbox'

test "$ret" = 0 && echo "Success!"
exit $ret

22 changes: 3 additions & 19 deletions ci/tests/rp/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,15 @@ cat > .radical/pilot/configs/resource_local.json <<EOF
EOF
export RADICAL_CONFIG_USER_DIR=$(pwd)

if [[ ! -d "./radical.pilot" ]]; then
git clone -b v$rp_version --single-branch \
https://github.com/radical-cybertools/radical.pilot.git
fi
cd radical.pilot
wget "https://raw.githubusercontent.com/radical-cybertools/radical.pilot/v$rp_version/examples/00_getting_started.py"

echo '--- smoke test'
./examples/00_getting_started.py local.localhost
radical-stack
./00_getting_started.py local.localhost
ret=$?
echo "--- smoke test $ret"

SID=$(ls -rt | grep rp.session)
test -z "$SID" || rm -rf "$HOME/radical.pilot.sandbox/$SID"

echo '--- unit test'
pytest -vvv tests/unit_tests
test "$ret" = 0 && ret=$?
echo "--- unit test $ret"

echo '--- component test'
pytest -vvv tests/component_tests
test "$ret" = 0 && ret=$?
echo "--- component test $ret"

rm -rf $HOME/radical.pilot.sandbox/*
echo '--- cleaned pilot sandbox'

test "$ret" = 0 && echo "Success!"
Expand Down

0 comments on commit 1938139

Please sign in to comment.