Skip to content

Commit

Permalink
add test to verdi.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Feb 17, 2022
1 parent a2ab246 commit accff4b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/verdi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,18 @@ done

$VERDI devel check-load-time
$VERDI devel check-undesired-imports


# Test that we can also run the CLI via `python -m aiida`,
# that it returns a 0 exit code, and contains the expected stdout.
OUTPUT=$(python -m aiida 2>&1)
retVal=$?
if [ $retVal -ne 0 ]; then
echo "'python -m aiida' exitted with code $retVal"
fi
if [[ $OUTPUT != *"command line interface of AiiDA"* ]]; then
echo "'python -m aiida' did not contain the expected stdout:"
echo "$OUTPUT"
exit 2
fi
exit $retVal

0 comments on commit accff4b

Please sign in to comment.