Skip to content

Commit 34b26f4

Browse files
committed
Break the actual test runner into its own script
So that we don't have to run with coverage if we don't want to. Additionally, don't require being in the t directory to run tests Signed-off-by: Stefano Rivera <[email protected]>
1 parent 75e67bc commit 34b26f4

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ build:
1212
@echo Nothing to do: filter-repo is a script which needs no compilation.
1313

1414
test:
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.

t/run_coverage

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ EOF
1616

1717
export COVERAGE_PROCESS_START=$tmpdir/.coveragerc
1818
export 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
2319

24-
ls t939*.sh | xargs -n 1 bash
20+
$orig_dir/run_tests
2521

2622
cd $tmpdir
2723
coverage3 combine

t/run_tests

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
cd $(dirname $0)
4+
5+
# We pretend filenames are unicode for two reasons: (1) because it exercises
6+
# more code, and (2) this setting will detect accidental use of unicode strings
7+
# for file/directory names when it should always be bytestrings.
8+
export PRETEND_UNICODE_ARGS=1
9+
10+
ls t939*.sh | xargs -n 1 bash

0 commit comments

Comments
 (0)