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 | \
18
18
find " ${WORKDIR} /tests/" -name ' smoketest*.xml' -maxdepth 1 -print0 | \
19
19
xargs -0 -I file ./codecov.io -f file -t " ${CODECOV_TOKEN} " -F smoketests
20
20
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 49
49
timeout : 7200
50
50
parallel : true
51
51
post :
52
+ # Place reports in the appropriate folder
53
+ - mkdir -p ${CIRCLE_TEST_REPORTS}/tests/ && cp ${WORKDIR}/tests/*.xml ${CIRCLE_TEST_REPORTS}/tests/
52
54
# Send coverage data to codecov.io
53
55
- bash .circle/codecov.sh
54
56
@@ -57,6 +59,7 @@ general:
57
59
- " ~/work/docs"
58
60
- " ~/work/logs"
59
61
- " ~/work/tests"
62
+ - " ~/work/crashfiles"
60
63
61
64
deployment :
62
65
production :
Original file line number Diff line number Diff line change 8
8
tmp_var=$( IFS=$' ' ; echo " ${arr[*]} " )
9
9
example_id=${tmp_var// [^A-Za-z0-9_-]/ _}
10
10
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
12
12
echo " [logging]" > ${HOME} /.nipype/nipype.cfg
13
13
echo " workflow_level = DEBUG" >> ${HOME} /.nipype/nipype.cfg
14
14
echo " interface_level = DEBUG" >> ${HOME} /.nipype/nipype.cfg
@@ -17,16 +17,16 @@ echo "log_to_file = true" >> ${HOME}/.nipype/nipype.cfg
17
17
echo " log_directory = ${WORKDIR} /logs/example_${example_id} " >> ${HOME} /.nipype/nipype.cfg
18
18
19
19
# 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}
23
21
if [ " $2 " == " MultiProc" ]; then
24
22
echo " concurrency = multiprocessing" >> /src/nipype/.coveragerc
25
23
fi
26
24
27
25
coverage run /src/nipype/tools/run_examples.py $@
28
26
exit_code=$?
29
27
28
+ # Collect crashfiles and generate xml report
30
29
coverage xml -o ${WORKDIR} /tests/smoketest_${example_id} .xml
30
+ find /work -name " crash-*" -maxdepth 1 -exec mv {} ${WORKDIR} /crashfiles/ \;
31
31
exit $exit_code
32
32
Original file line number Diff line number Diff line change @@ -24,20 +24,20 @@ if [[ "${PYTHON_VERSION}" -lt "30" ]]; then
24
24
fi
25
25
26
26
# Run tests using pytest
27
- export COVERAGE_FILE=${WORKDIR} /tests/.coverage_py ${PYTHON_VERSION}
27
+ export COVERAGE_FILE=${WORKDIR} /tests/.coverage.py ${PYTHON_VERSION}
28
28
py.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}
29
29
exit_code=$?
30
30
31
31
# Workaround: run here the profiler tests in python 3
32
32
if [[ " ${PYTHON_VERSION} " -ge " 30" ]]; then
33
33
echo ' [execution]' >> ${HOME} /.nipype/nipype.cfg
34
34
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
36
36
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
37
37
exit_code=$(( $exit_code + $? ))
38
38
fi
39
39
40
- find /src/nipype/ -name " crash-*" -exec mv {} ${WORKDIR} /crashfiles/ \;
40
+ find /work -name " crash-*" -maxdepth 1 -exec mv {} ${WORKDIR} /crashfiles/ \;
41
41
42
42
# Just in case output xml files are misplaced,
43
43
# then circle would not tell the tests failed otherwise
You can’t perform that action at this time.
0 commit comments