Skip to content

Commit bee71be

Browse files
committed
produce one xunitfile per py version and merge them
1 parent 128e0dc commit bee71be

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

circle.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ dependencies:
2525
timeout: 1600
2626
- mkdir -p ~/docker; docker save nipype/nipype_test:py35 > ~/docker/image.tar :
2727
timeout: 1600
28+
- pip install xunitmerge
2829

2930
test:
3031
override:
3132
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /root/src/nipype/doc nipype/nipype_test:py35 /usr/bin/run_builddocs.sh
32-
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py35 /usr/bin/run_nosetests.sh :
33+
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py35 /usr/bin/run_nosetests.sh py35 :
3334
timeout: 2600
34-
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py27 /usr/bin/run_nosetests.sh :
35+
- docker run -v /etc/localtime:/etc/localtime:ro -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /root/src/nipype nipype/nipype_test:py27 /usr/bin/run_nosetests.sh py27 :
3536
timeout: 2600
3637
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh test_spm Linear /root/examples/ workflow3d :
3738
timeout: 1600
@@ -46,14 +47,16 @@ test:
4647
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py27 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ level1
4748
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested MultiProc /root/examples/ level1
4849
- docker run -v /etc/localtime:/etc/localtime:ro -v ~/examples:/root/examples:ro -v ~/scratch:/scratch -w /scratch nipype/nipype_test:py35 /usr/bin/run_examples.sh fmri_spm_nested Linear /root/examples/ l2pipeline
49-
50+
5051
post:
5152
- bash docker/circleci/teardown.sh
5253

5354
general:
5455
artifacts:
5556
- "~/docs"
5657
- "~/logs"
57-
- "~/coverage.xml"
58-
- "~/nosetests.xml"
58+
- "~/coverage_py27.xml"
59+
- "~/coverage_py35.xml"
60+
- "~/nosetests_py27.xml"
61+
- "~/nosetests_py35.xml"
5962
- "~/scratch"

docker/circleci/run_nosetests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ set -x
44
set -u
55

66
# Create necessary directories
7-
mkdir -p /scratch/nose /scratch/crashfiles
7+
mkdir -p /scratch/nose /scratch/crashfiles /scratch/logs/$1
88

99
# Create a nipype config file
1010
mkdir -p /root/.nipype
1111
echo '[logging]' > /root/.nipype/nipype.cfg
1212
echo 'log_to_file = true' >> /root/.nipype/nipype.cfg
13-
echo 'log_directory = /scratch/logs/' >> /root/.nipype/nipype.cfg
13+
echo "log_directory = /scratch/logs/$1" >> /root/.nipype/nipype.cfg
1414

1515

1616
# Run tests
1717
cd /root/src/nipype/
1818
make clean
19-
nosetests -s nipype -c /root/src/nipype/.noserc --xunit-file="/scratch/nosetests.xml" --cover-xml-file="/scratch/coverage.xml"
19+
nosetests -s nipype -c /root/src/nipype/.noserc --xunit-file="/scratch/nosetests_$1.xml" --cover-xml-file="/scratch/coverage_$1.xml"
2020

2121
# Copy crashfiles to scratch
2222
for i in $(find /root/src/nipype/ -name "crash-*" ); do cp $i /scratch/crashfiles/; done

docker/circleci/teardown.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ set -u
77
set -e
88

99
mkdir -p ${CIRCLE_TEST_REPORTS}/nose
10-
sudo cp ~/scratch/nosetests.xml ${CIRCLE_TEST_REPORTS}/nose/${CIRCLE_PROJECT_REPONAME}.xml
11-
sudo mv ~/scratch/coverage.xml ~/coverage.xml
10+
xunitmerge ~/scratch/nosetests*.xml ${CIRCLE_TEST_REPORTS}/nose/${CIRCLE_PROJECT_REPONAME}.xml
11+
sudo mv ~/scratch/coverage*.xml ~/
1212
mkdir -p ~/docs
1313
sudo mv ~/scratch/docs/* ~/docs/
1414
mkdir -p ~/logs

0 commit comments

Comments
 (0)