on master help sign in
Get benchmarks going again

--HG-- rename : tests/README.markdown => tests-and-benchmarks.markdown

commit9e31c7fc26ca24547b90d6c9cad491ab5140a83a authorBryan O'Sullivan <bos@serpentine.com> dateThu 28 Jun 2012, 21:28 (14 years ago) parenta827b2e
4 files changed+21−22
benchmarks/haskell/Benchmarks.hs+1−1 tests/README.markdown → tests-and-benchmarks.markdown+14−19 tests/Makefile+5−1 text.cabal+1−1
benchmarks/haskell/Benchmarks.hs+1−1
@@ -70,4 +70,4 @@ benchmarks = do
7070 return $ bs ++ [ps]
7171 where
7272 -- 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+====================
83
94Prerequisites
105-------------
116
12−To run these tests, you will need the test data from one of the following
13−locations:
7+To run the tests and benchmarks, you will need the test data, which
8+you can clone from one of the following locations:
149
1510* Mercurial master repository:
1611 [bitbucket.org/bos/text-test-data](https://bitbucket.org/bos/text-test-data)
@@ -18,10 +13,10 @@ locations:
1813* Git mirror repository:
1914 [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
2015
21−You should clone that repository to the same directory as this `README` file
22−(your 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
24−test files are missing.
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.
2520
2621Functional tests
2722----------------
@@ -29,10 +24,10 @@ Functional tests
2924The functional tests are located in the `tests` subdirectory. An overview of
3025what's in that directory:
3126
32− scripts Various utility scripts
33− src Source files of the testing code
34− text-tests.cabal Cabal file which compiles all benchmarks
3527 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
3631
3732The `text-tests.cabal` builds:
3833
@@ -48,11 +43,11 @@ Benchmarks
4843The benchmarks are located in the `benchmarks` subdirectory. An overview of
4944what's in that directory:
5045
46+ Makefile Has targets for common tasks
47+ haskell Source files of the haskell benchmarks
5148 python Python implementations of some benchmarks
5249 ruby Ruby implementations of some benchmarks
53− src Source files of the haskell benchmarks
5450 text-benchmarks.cabal Cabal file which compiles all benchmarks
55− Makefile Has targets for common tasks
5651
5752To compile the benchmarks, navigate to the `benchmarks` subdirectory and run
5853`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:
6560 ./dist/build/benchmarks/benchmarks
6661
6762And 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 @@
11coverage: build coverage/hpc_index.html
22
3−build:
3+build: text-test-data
44 cabal configure -fhpc
55 cabal build
66
7+text-test-data:
8+ hg clone https://bitbucket.org/bos/text-test-data
9+ $(MAKE) -C text-test-data
10+
711coverage/text-tests.tix:
812 -mkdir -p coverage
913 ./dist/build/text-tests/text-tests
text.cabal+1−1
@@ -60,7 +60,7 @@ extra-source-files:
6060 benchmarks/src/Data/Text/Benchmarks/*.hs
6161 benchmarks/text-benchmarks.cabal
6262 scripts/*.hs
63− tests/README.markdown
63+ tests-and-benchmarks.markdown
6464 tests/.ghci
6565 tests/Makefile
6666 tests/scripts/*.sh