File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed
Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,3 @@ find "${WORKDIR}/tests/" -name 'coverage*.xml' -maxdepth 1 -print0 | \
1818find " ${WORKDIR} /tests/" -name ' smoketest*.xml' -maxdepth 1 -print0 | \
1919 xargs -0 -I file ./codecov.io -f file -t " ${CODECOV_TOKEN} " -F smoketests
2020
21- # Place test and coverage in the tests folder
22- mkdir -p ${CIRCLE_TEST_REPORTS} /tests/
23- cp ${WORKDIR} /tests/* .xml ${CIRCLE_TEST_REPORTS} /tests/
24-
Original file line number Diff line number Diff line change 4949 timeout : 7200
5050 parallel : true
5151 post :
52+ # Place reports in the appropriate folder
53+ - mkdir -p ${CIRCLE_TEST_REPORTS}/tests/ && cp ${WORKDIR}/tests/*.xml ${CIRCLE_TEST_REPORTS}/tests/
5254 # Send coverage data to codecov.io
5355 - bash .circle/codecov.sh
5456
@@ -57,6 +59,7 @@ general:
5759 - " ~/work/docs"
5860 - " ~/work/logs"
5961 - " ~/work/tests"
62+ - " ~/work/crashfiles"
6063
6164deployment :
6265 production :
Original file line number Diff line number Diff line change 88tmp_var=$( IFS=$' ' ; echo " ${arr[*]} " )
99example_id=${tmp_var// [^A-Za-z0-9_-]/ _}
1010
11- mkdir -p ${HOME} /.nipype ${WORKDIR} /logs/example_${example_id} ${WORKDIR} /tests
11+ mkdir -p ${HOME} /.nipype ${WORKDIR} /logs/example_${example_id} ${WORKDIR} /tests ${WORKDIR} /crashfiles
1212echo " [logging]" > ${HOME} /.nipype/nipype.cfg
1313echo " workflow_level = DEBUG" >> ${HOME} /.nipype/nipype.cfg
1414echo " interface_level = DEBUG" >> ${HOME} /.nipype/nipype.cfg
@@ -17,16 +17,16 @@ echo "log_to_file = true" >> ${HOME}/.nipype/nipype.cfg
1717echo " log_directory = ${WORKDIR} /logs/example_${example_id} " >> ${HOME} /.nipype/nipype.cfg
1818
1919# Set up coverage
20- export COVERAGE_FILE=${WORKDIR} /tests/.coverage_${example_id}
21- # sed -i -E "s/(source = ).*'/\1\/src\/nipype\/nipype/" /src/nipype/.coveragerc
22-
20+ export COVERAGE_FILE=${WORKDIR} /tests/.coverage.${example_id}
2321if [ " $2 " == " MultiProc" ]; then
2422 echo " concurrency = multiprocessing" >> /src/nipype/.coveragerc
2523fi
2624
2725coverage run /src/nipype/tools/run_examples.py $@
2826exit_code=$?
2927
28+ # Collect crashfiles and generate xml report
3029coverage xml -o ${WORKDIR} /tests/smoketest_${example_id} .xml
30+ find /work -name " crash-*" -maxdepth 1 -exec mv {} ${WORKDIR} /crashfiles/ \;
3131exit $exit_code
3232
Original file line number Diff line number Diff line change @@ -24,20 +24,20 @@ if [[ "${PYTHON_VERSION}" -lt "30" ]]; then
2424fi
2525
2626# Run tests using pytest
27- export COVERAGE_FILE=${WORKDIR} /tests/.coverage_py ${PYTHON_VERSION}
27+ export COVERAGE_FILE=${WORKDIR} /tests/.coverage.py ${PYTHON_VERSION}
2828py.test -v --junitxml=${WORKDIR} /tests/pytests_py${PYTHON_VERSION} .xml --cov nipype --cov-config /src/nipype/.coveragerc --cov-report xml:${WORKDIR} /tests/coverage_py${PYTHON_VERSION} .xml ${TESTPATH}
2929exit_code=$?
3030
3131# Workaround: run here the profiler tests in python 3
3232if [[ " ${PYTHON_VERSION} " -ge " 30" ]]; then
3333 echo ' [execution]' >> ${HOME} /.nipype/nipype.cfg
3434 echo ' profile_runtime = true' >> ${HOME} /.nipype/nipype.cfg
35- export COVERAGE_FILE=${WORKDIR} /tests/.coverage_py ${PYTHON_VERSION} _extra
35+ export COVERAGE_FILE=${WORKDIR} /tests/.coverage.py ${PYTHON_VERSION} _extra
3636 py.test -v --junitxml=${WORKDIR} /tests/pytests_py${PYTHON_VERSION} _extra.xml --cov nipype --cov-report xml:${WORKDIR} /tests/coverage_py${PYTHON_VERSION} _extra.xml /src/nipype/nipype/interfaces/tests/test_runtime_profiler.py /src/nipype/nipype/pipeline/plugins/tests/test_multiproc* .py
3737 exit_code=$(( $exit_code + $? ))
3838fi
3939
40- find /src/nipype/ -name " crash-*" -exec mv {} ${WORKDIR} /crashfiles/ \;
40+ find /work -name " crash-*" -maxdepth 1 -exec mv {} ${WORKDIR} /crashfiles/ \;
4141
4242# Just in case output xml files are misplaced,
4343# then circle would not tell the tests failed otherwise
You can’t perform that action at this time.
0 commit comments