Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pycbc_test_suite to be able to run from anywhere within the git repo #4774

Merged
merged 4 commits into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tools/pycbc_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ echo -e "\\n>> [`date`] Python Major Version:" $PYTHON_VERSION
PYTHON_MINOR_VERSION=`python -c 'import sys; print(sys.version_info.minor)'`
echo -e "\\n>> [`date`] Python Minor Version:" $PYTHON_MINOR_VERSION

# This will work from anywhere within the pycbc directory
this_script_dir=`dirname -- "$( readlink -f -- "$0"; )"`
cd $this_script_dir
cd ..

LOG_FILE=$(mktemp -t pycbc-test-log.XXXXXXXXXX)

RESULT=0
Expand All @@ -29,7 +34,8 @@ function test_result {
if [ "$PYCBC_TEST_TYPE" = "unittest" ] || [ -z ${PYCBC_TEST_TYPE+x} ]; then
for prog in `find test -name '*.py' -print | egrep -v '(long|lalsim|test_waveform)'`
do
echo -e ">> [`date`] running unit test for $prog"
prog_short=`echo $prog | rev | cut -d"/" -f1 | rev`
echo -e ">> [`date`] running unit test for $prog_short"
python $prog &> $LOG_FILE
test_result
done
Expand Down
Loading