run.sh 737 Bytes
Newer Older
Willi Rath's avatar
Willi Rath committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/bash

# get path to tmp directory
[ "$1" == "" ] && { echo "Need one arg: <path-to-tmp>. Aborting."; exit; }
tmp_dir=$1/_tmp/

# get mc3 target directory
mc3_target_dir=_miniconda3

# activate working env and fail if there's a problem
source ${mc3_target_dir}/bin/activate py3_std || \
    { echo "Activation of working env failed.";
      echo "Please run set_up_environment.sh first.";
      exit; }

Willi Rath's avatar
Willi Rath committed
16 17 18 19 20 21 22 23 24

# If we're running the large tests, allow for 24GB virtual memory instead of 8
if [ $PYTEST_LARGE_TESTS == "TRUE" ]; then
    vlim=32
else
    vlim=8
fi
ulimit -v "$(expr ${vlim} \* 1000 \* 1000)"

Willi Rath's avatar
Willi Rath committed
25 26
# run all tests using a local tmp dir and monitor
# timing of all tests
Willi Rath's avatar
Willi Rath committed
27
pytest -v -s --basetemp=${tmp_dir} --durations=0 tests/