aboutsummaryrefslogtreecommitdiffstats
path: root/HOWTO
diff options
context:
space:
mode:
authorKjell Winblad <[email protected]>2019-06-26 08:31:19 +0200
committerKjell Winblad <[email protected]>2019-06-26 08:31:19 +0200
commit14944c65bada76cf246f885f7a146c7fd54cb3df (patch)
treeda9368f155f49924d15db82506bfe0d9c8b26ffa /HOWTO
parentc59148c2995d5ac63094ab2e39682f47671ee37e (diff)
parent2f246b551cca5ca7ca9187282e42650976a65cbb (diff)
downloadotp-14944c65bada76cf246f885f7a146c7fd54cb3df.tar.gz
otp-14944c65bada76cf246f885f7a146c7fd54cb3df.tar.bz2
otp-14944c65bada76cf246f885f7a146c7fd54cb3df.zip
Merge branch 'kjell/make_test/OTP-15812'
Diffstat (limited to 'HOWTO')
-rw-r--r--HOWTO/TESTING.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/HOWTO/TESTING.md b/HOWTO/TESTING.md
index ad59319efa..020be0309c 100644
--- a/HOWTO/TESTING.md
+++ b/HOWTO/TESTING.md
@@ -130,6 +130,52 @@ i.e.
Running [ct_run][] from the command line still requires you to do the
`ts:install()` step above.
+### Convenience for running tests without the release and configuration steps
+
+It can be convenient to run tests with a single command. This way, one
+do not need to worry about missing to run `make release_tests` after
+changing a test suite. The `make test` command can be used for this
+purpose. The `make test` command works when the current directory
+contains a directory called test and in the root directory of the
+source code tree.
+
+*(Waring)* Some test cases do not run correctly or cannot be run at
+all through the `make test` command (typically test cases that require
+test specific C code to be compiled) because `make test` runs tests
+directly by invoking the `ct_run` command instead of using the `ts`
+wrapper. One has to follow the procedure described above to run test
+cases that do not work with `make test`.
+
+Below are some examples that illustrate how `make test` can be
+used:
+
+ # ERL_TOP needs to be set correctly
+ cd /path/to/otp
+ export ERL_TOP=`pwd`
+
+ # Build Erlang/OTP
+ #
+ # Note that make test will only compile test code except when
+ # make test is executed from $ERL_TOP.
+ ./otp_build setup -a
+
+ # Run a test case (The ARGS variable is passed to ct_run)
+ (cd $ERL_TOP/erts/emulator && make ARGS="-suite binary_SUITE -case deep_bitstr_lists" test)
+
+ # Run a test suite
+ (cd $ERL_TOP/lib/stdlib && make ARGS="-suite ets_SUITE" test)
+
+ # Run all test suites for an application
+ (cd $ERL_TOP/lib/asn1 && make test)
+
+ # Run all tests
+ #
+ # When executed from $ERL_TOP, "make test" will first release and
+ # configure all tests and then attempt to run all tests with `ts:run`.
+ # This will take several hours.
+ (cd $ERL_TOP && make test)
+
+
Examining the results
---------------------