Skip to content

Commit becdb77

Browse files
kuk0hvr
authored andcommitted
improve Makefile for getting test-data
add a target for git and update docs
1 parent dcbb74d commit becdb77

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tests-and-benchmarks.markdown

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ you can clone from one of the following locations:
1313
* Git mirror repository:
1414
[github.com/bos/text-test-data](https://github.com/bos/text-test-data)
1515

16-
You should clone that repository into the `tests` subdirectory (your
17-
clone must be named `text-test-data` locally), then run `make -C
18-
tests/text-test-data` to uncompress the test files. Many tests and
19-
benchmarks will fail if the test files are missing.
16+
You can clone either repository into the `tests` subdirectory using
17+
18+
cd tests/
19+
make text-test-data # to clone from mercurial, OR
20+
make VCS=git text-test-data # to clone from git
21+
22+
Many tests and benchmarks will fail if the test files are missing.
2023

2124
Functional tests
2225
----------------

tests/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
VCS = hg
12
count = 1000
23

34
all: coverage literal-rule-test
@@ -12,7 +13,11 @@ build: text-test-data
1213
cabal build
1314

1415
text-test-data:
16+
ifeq ($(VCS),git)
17+
git clone https://github.com/bos/text-test-data.git
18+
else
1519
hg clone https://bitbucket.org/bos/text-test-data
20+
endif
1621
$(MAKE) -C text-test-data
1722

1823
coverage/text-tests.tix:
@@ -37,4 +42,4 @@ coverage/hpc_index.html: coverage/coverage.tix
3742
clean:
3843
rm -rf dist coverage .hpc
3944

40-
.PHONY: build coverage all literal-rule-test
45+
.PHONY: all build clean coverage literal-rule-test

0 commit comments

Comments
 (0)