File tree Expand file tree Collapse file tree 4 files changed +40
-19
lines changed
Expand file tree Collapse file tree 4 files changed +40
-19
lines changed Original file line number Diff line number Diff line change @@ -24,21 +24,11 @@ jobs:
2424 printf '#!/bin/sh\n\nexec python "$@"\n' >python3 &&
2525
2626 export PATH=$PWD:$PATH &&
27- export PYTHONPATH=$PWD &&
28- export TEST_SHELL_PATH=/bin/sh &&
2927
30- failed=0 &&
31- cd t &&
32- for t in t[0-9]*.sh
33- do
34- printf '\n\n== %s ==\n' "$t" &&
35- bash $t -q -v -x ||
36- failed=$(($failed+1))
37- done &&
38- if test 0 != $failed
28+ if ! t/run_tests -q -v -x
3929 then
40- mkdir ../ failed &&
41- tar czf ../ failed/failed.tar.gz .
30+ mkdir failed &&
31+ tar czf failed/failed.tar.gz t
4232 exit 1
4333 fi
4434 - name : upload failed tests' directories
Original file line number Diff line number Diff line change 1212 @echo Nothing to do: filter-repo is a script which needs no compilation.
1313
1414test :
15- cd t && time . /run_coverage
15+ time t /run_coverage
1616
1717# fixup_locale might matter once we actually have translations, but right now
1818# we don't. It might not even matter then, because python has a fallback podir.
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ set -eu
4+
35orig_dir=$( cd $( dirname $0 ) && pwd -P)
46tmpdir=$( mktemp -d)
57
1618
1719export COVERAGE_PROCESS_START=$tmpdir /.coveragerc
1820export PYTHONPATH=$tmpdir :
19- # We pretend filenames are unicode for two reasons: (1) because it exercises
20- # more code, and (2) this setting will detect accidental use of unicode strings
21- # for file/directory names when it should always be bytestrings.
22- export PRETEND_UNICODE_ARGS=1
2321
24- ls t939* .sh | xargs -n 1 bash
22+ # Produce a coverage report, even if the tests fail
23+ set +e
24+ $orig_dir /run_tests
25+ exitcode=$?
26+ set -e
2527
2628cd $tmpdir
2729coverage3 combine
2830coverage3 html -d $orig_dir /report
2931coverage3 report -m
3032cd $orig_dir
3133rm -rf $tmpdir
34+
35+ exit $exitcode
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -eu
3+
4+ cd $( dirname $0 )
5+
6+ # Put git_filter_repo.py on the front of PYTHONPATH
7+ export PYTHONPATH=" $PWD /..${PYTHONPATH: +: $PYTHONPATH } "
8+
9+ # We pretend filenames are unicode for two reasons: (1) because it exercises
10+ # more code, and (2) this setting will detect accidental use of unicode strings
11+ # for file/directory names when it should always be bytestrings.
12+ export PRETEND_UNICODE_ARGS=1
13+
14+ export TEST_SHELL_PATH=/bin/sh
15+
16+ failed=0
17+
18+ for t in t[0-9]* .sh
19+ do
20+ printf ' \n\n== %s ==\n' " $t "
21+ bash $t " $@ " || failed=$(( $failed + 1 ))
22+ done
23+
24+ if [ 0 -lt $failed ]
25+ then
26+ exit 1
27+ fi
You can’t perform that action at this time.
0 commit comments