Commits

Bryan O'Sullivan committed 870abbf

Get benchmarks going again

Comments (0)

Files changed (5)

benchmarks/haskell/Benchmarks.hs

     return $ bs ++ [ps]
   where
     -- Location of a test file
-    tf = ("../text-test-data" </>)
+    tf = ("../tests/text-test-data" </>)

tests-and-benchmarks.markdown

+Tests and benchmarks
+====================
+
+Prerequisites
+-------------
+
+To run the tests and benchmarks, you will need the test data, which
+you can clone from one of the following locations:
+
+* Mercurial master repository:
+  [bitbucket.org/bos/text-test-data](https://bitbucket.org/bos/text-test-data)
+
+* Git mirror repository:
+  [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
+
+You should clone that repository into the `tests` subdirectory (your
+clone must be named `text-test-data` locally), then run `make -C
+tests/text-test-data` to uncompress the test files.  Many tests and
+benchmarks will fail if the test files are missing.
+
+Functional tests
+----------------
+
+The functional tests are located in the `tests` subdirectory. An overview of
+what's in that directory:
+
+    Makefile          Has targets for common tasks
+    Tests             Source files of the testing code
+    scripts           Various utility scripts
+    text-tests.cabal  Cabal file that compiles all benchmarks
+
+The `text-tests.cabal` builds:
+
+- A copy of the text library, sharing the source code, but exposing all internal
+  modules, for testing purposes
+- The different test suites
+
+To compile, run all tests, and generate a coverage report, simply use `make`.
+
+Benchmarks
+----------
+
+The benchmarks are located in the `benchmarks` subdirectory. An overview of
+what's in that directory:
+
+    Makefile               Has targets for common tasks
+    haskell                Source files of the haskell benchmarks
+    python                 Python implementations of some benchmarks
+    ruby                   Ruby implementations of some benchmarks
+    text-benchmarks.cabal  Cabal file which compiles all benchmarks
+
+To compile the benchmarks, navigate to the `benchmarks` subdirectory and run
+`cabal configure && cabal build`. Then, you can run the benchmarks using:
+
+    ./dist/build/benchmarks/benchmarks
+
+However, since there's quite a lot of benchmarks, you usually don't want to
+run them all. Instead, use the `-l` flag to get a list of benchmarks:
+
+    ./dist/build/benchmarks/benchmarks
+
+And run the ones you want to inspect. If you want to configure the benchmarks
+further, the exact parameters can be changed in `Benchmarks.hs`.
 coverage: build coverage/hpc_index.html
 
-build:
+build: text-test-data
 	cabal configure -fhpc
 	cabal build
 
+text-test-data:
+	hg clone https://bitbucket.org/bos/text-test-data
+	$(MAKE) -C text-test-data
+
 coverage/text-tests.tix:
 	-mkdir -p coverage
 	./dist/build/text-tests/text-tests

tests/README.markdown

-Tests
-=====
-
-This directory contains the tests for the Text library.
-
-There are two categories of tests: functional tests (including QuickCheck
-properties) and benchmarks.
-
-Prerequisites
--------------
-
-To run these tests, you will need the test data from one of the following
-locations:
-
-* Mercurial master repository:
-  [bitbucket.org/bos/text-test-data](https://bitbucket.org/bos/text-test-data)
-
-* Git mirror repository:
-  [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
-
-You should clone that repository to the same directory as this `README` file
-(your clone must be named `text-test-data` locally), then run `make -C
-text-test-data` to uncompress the test files.  Many tests will fail if the
-test files are missing.
-
-Functional tests
-----------------
-
-The functional tests are located in the `tests` subdirectory. An overview of
-what's in that directory:
-
-    scripts           Various utility scripts
-    src               Source files of the testing code
-    text-tests.cabal  Cabal file which compiles all benchmarks
-    Makefile          Has targets for common tasks
-
-The `text-tests.cabal` builds:
-
-- A copy of the text library, sharing the source code, but exposing all internal
-  modules, for testing purposes
-- The different test suites
-
-To compile, run all tests, and generate a coverage report, simply use `make`.
-
-Benchmarks
-----------
-
-The benchmarks are located in the `benchmarks` subdirectory. An overview of
-what's in that directory:
-
-    python                 Python implementations of some benchmarks
-    ruby                   Ruby implementations of some benchmarks
-    src                    Source files of the haskell benchmarks
-    text-benchmarks.cabal  Cabal file which compiles all benchmarks
-    Makefile               Has targets for common tasks
-
-To compile the benchmarks, navigate to the `benchmarks` subdirectory and run
-`cabal configure && cabal build`. Then, you can run the benchmarks using:
-
-    ./dist/build/benchmarks/benchmarks
-
-However, since there's quite a lot of benchmarks, you usually don't want to
-run them all. Instead, use the `-l` flag to get a list of benchmarks:
-
-    ./dist/build/benchmarks/benchmarks
-
-And run the ones you want to inspect. If you want to configure the benchmarks
-further, the exact parameters can be changed in `src/Data/Text/Benchmarks.hs`.
     benchmarks/src/Data/Text/Benchmarks/*.hs
     benchmarks/text-benchmarks.cabal
     scripts/*.hs
-    tests/README.markdown
+    tests-and-benchmarks.markdown
     tests/.ghci
     tests/Makefile
     tests/scripts/*.sh
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.