File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ # Stack Integration Tests
2+
3+ This directory contains a bunch of integration tests for Stack. Each
4+ directory inside the ` tests ` subdirectory represents a single
5+ test. Each of those directories has:
6+
7+ * A ` Main.hs ` file, which provides the script to be run
8+ * A ` files ` directory, providing the working directory the script will
9+ be run from. (If you have a test that doesn't require any specific
10+ working directory, there may be no ` files ` directory.)
11+
12+ It would be great to expand this file into a full tutorial, but for
13+ now, the easiest way to get started with writing an integration test
14+ is to copy an existing example.
15+
16+ ## Running
17+
18+ One simple way to run a single test is:
19+
20+ * Change into the ` files ` directory
21+ * Run the command ` stack runghc -- -i../../../lib ../Main.hs `
22+
23+ A more thorough way to run the tests is with
24+
25+ ``` shell
26+ $ stack test --flag stack:integration-tests stack:test:stack-integration-test
27+ ```
28+
29+ Note that this command can take a _ long_ time. It's also more thorough
30+ than the quick command given above, as it will run each test with a
31+ clean ` STACK_ROOT ` .
You can’t perform that action at this time.
0 commit comments