on master help sign in
Get benchmarks going again
9e31c7fBryan O'Sullivan
benchmarks/haskell/Benchmarks.hs+1−1
@@ -70,4 +70,4 @@ benchmarks = do
70 return $ bs ++ [ps]
70 return $ bs ++ [ps]
71 where
71 where
72 -- Location of a test file
72 -- Location of a test file
73− tf = ("../text-test-data" </>)
73+ tf = ("../tests/text-test-data" </>)
tests/README.markdown → tests-and-benchmarks.markdownrenamed+14−19
@@ -1,16 +1,11 @@
1−Tests
2−=====
3−
4−This directory contains the tests for the Text library.
5−
6−There are two categories of tests: functional tests (including QuickCheck
7−properties) and benchmarks.
1+Tests and benchmarks
2+====================
8
3
9Prerequisites
4Prerequisites
10-------------
5-------------
11
6
12−To run these tests, you will need the test data from one of the following
7+To run the tests and benchmarks, you will need the test data, which
13−locations:
8+you can clone from one of the following locations:
14
9
15* Mercurial master repository:
10* Mercurial master repository:
16 [bitbucket.org/bos/text-test-data](https://bitbucket.org/bos/text-test-data)
11 [bitbucket.org/bos/text-test-data](https://bitbucket.org/bos/text-test-data)
@@ -18,10 +13,10 @@ locations:
18* Git mirror repository:
13* Git mirror repository:
19 [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
14 [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
20
15
21−You should clone that repository to the same directory as this `README` file
16+You should clone that repository into the `tests` subdirectory (your
22−(your clone must be named `text-test-data` locally), then run `make -C
17+clone must be named `text-test-data` locally), then run `make -C
23−text-test-data` to uncompress the test files. Many tests will fail if the
18+tests/text-test-data` to uncompress the test files. Many tests and
24−test files are missing.
19+benchmarks will fail if the test files are missing.
25
20
26Functional tests
21Functional tests
27----------------
22----------------
@@ -29,10 +24,10 @@ Functional tests
29The functional tests are located in the `tests` subdirectory. An overview of
24The functional tests are located in the `tests` subdirectory. An overview of
30what's in that directory:
25what's in that directory:
31
26
32− scripts Various utility scripts
33− src Source files of the testing code
34− text-tests.cabal Cabal file which compiles all benchmarks
35 Makefile Has targets for common tasks
27 Makefile Has targets for common tasks
28+ Tests Source files of the testing code
29+ scripts Various utility scripts
30+ text-tests.cabal Cabal file that compiles all benchmarks
36
31
37The `text-tests.cabal` builds:
32The `text-tests.cabal` builds:
38
33
@@ -48,11 +43,11 @@ Benchmarks
48The benchmarks are located in the `benchmarks` subdirectory. An overview of
43The benchmarks are located in the `benchmarks` subdirectory. An overview of
49what's in that directory:
44what's in that directory:
50
45
46+ Makefile Has targets for common tasks
47+ haskell Source files of the haskell benchmarks
51 python Python implementations of some benchmarks
48 python Python implementations of some benchmarks
52 ruby Ruby implementations of some benchmarks
49 ruby Ruby implementations of some benchmarks
53− src Source files of the haskell benchmarks
54 text-benchmarks.cabal Cabal file which compiles all benchmarks
50 text-benchmarks.cabal Cabal file which compiles all benchmarks
55− Makefile Has targets for common tasks
56
51
57To compile the benchmarks, navigate to the `benchmarks` subdirectory and run
52To compile the benchmarks, navigate to the `benchmarks` subdirectory and run
58`cabal configure && cabal build`. Then, you can run the benchmarks using:
53`cabal configure && cabal build`. Then, you can run the benchmarks using:
@@ -65,4 +60,4 @@ run them all. Instead, use the `-l` flag to get a list of benchmarks:
65 ./dist/build/benchmarks/benchmarks
60 ./dist/build/benchmarks/benchmarks
66
61
67And run the ones you want to inspect. If you want to configure the benchmarks
62And run the ones you want to inspect. If you want to configure the benchmarks
68−further, the exact parameters can be changed in `src/Data/Text/Benchmarks.hs`.
63+further, the exact parameters can be changed in `Benchmarks.hs`.
tests/Makefile+5−1
@@ -1,9 +1,13 @@
1coverage: build coverage/hpc_index.html
1coverage: build coverage/hpc_index.html
2
2
3−build:
3+build: text-test-data
4 cabal configure -fhpc
4 cabal configure -fhpc
5 cabal build
5 cabal build
6
6
7+text-test-data:
8+ hg clone https://bitbucket.org/bos/text-test-data
9+ $(MAKE) -C text-test-data
10+
7coverage/text-tests.tix:
11coverage/text-tests.tix:
8 -mkdir -p coverage
12 -mkdir -p coverage
9 ./dist/build/text-tests/text-tests
13 ./dist/build/text-tests/text-tests
text.cabal+1−1
@@ -60,7 +60,7 @@ extra-source-files:
60 benchmarks/src/Data/Text/Benchmarks/*.hs
60 benchmarks/src/Data/Text/Benchmarks/*.hs
61 benchmarks/text-benchmarks.cabal
61 benchmarks/text-benchmarks.cabal
62 scripts/*.hs
62 scripts/*.hs
63− tests/README.markdown
63+ tests-and-benchmarks.markdown
64 tests/.ghci
64 tests/.ghci
65 tests/Makefile
65 tests/Makefile
66 tests/scripts/*.sh
66 tests/scripts/*.sh