diff options
author | Stavros Aronis <[email protected]> | 2011-04-02 17:36:08 +0300 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-05-04 15:06:14 +0200 |
commit | bc619f0cbf9555df6dfc44a499f0cd9cee8bd1be (patch) | |
tree | 82f6b1da6e97603c3a8354a6ed78dd889a1281fc /lib/dialyzer/test/dialyzer_common.erl | |
parent | 4dd5d2a84e62ee53ead077c0075b3338a827280b (diff) | |
download | otp-bc619f0cbf9555df6dfc44a499f0cd9cee8bd1be.tar.gz otp-bc619f0cbf9555df6dfc44a499f0cd9cee8bd1be.tar.bz2 otp-bc619f0cbf9555df6dfc44a499f0cd9cee8bd1be.zip |
Simplify Dialyzer's test suite structure
*_SUITE.erl files are now automatically generated by the respective data
directories by the Makefile.
Diffstat (limited to 'lib/dialyzer/test/dialyzer_common.erl')
-rw-r--r-- | lib/dialyzer/test/dialyzer_common.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dialyzer/test/dialyzer_common.erl b/lib/dialyzer/test/dialyzer_common.erl index 5577405483..a24ac96bd7 100644 --- a/lib/dialyzer/test/dialyzer_common.erl +++ b/lib/dialyzer/test/dialyzer_common.erl @@ -7,13 +7,13 @@ -module(dialyzer_common). --export([check_plt/1, check/4, create_suite/1, - create_all_suites/0, new_tests/2]). +-export([check_plt/1, check/4, create_all_suites/0, new_tests/2]). -include_lib("kernel/include/file.hrl"). -define(suite_suffix, "_tests_SUITE"). -define(data_folder, "_data"). +-define(suite_data, ?suite_suffix ++ ?data_folder). -define(erlang_extension, ".erl"). -define(output_file_mode, write). -define(dialyzer_option_file, "dialyzer_options"). @@ -209,7 +209,7 @@ get_suites(Dir) -> {error, _} -> []; {ok, Filenames} -> FullFilenames = [filename:join(Dir, F) || F <-Filenames ], - Dirs = [suffix(filename:basename(F), "_tests_SUITE_data") || + Dirs = [suffix(filename:basename(F), ?suite_data) || F <- FullFilenames, file_utils:file_type(F) =:= {ok, 'directory'}], [S || {yes, S} <- Dirs] @@ -232,7 +232,7 @@ create_suite(SuiteName) -> generate_suite(SuiteName, OutputFile, OptionsFileN, InputDirN). generate_suite_dir_from_name(Cwd, SuiteName) -> - filename:join(Cwd, SuiteName ++ ?suite_suffix ++ ?data_folder). + filename:join(Cwd, SuiteName ++ ?suite_data). generate_suite_file(Cwd, SuiteName) -> OutputFilename = @@ -305,7 +305,7 @@ write_header(#suite{suitename = SuiteName, outputfile = OutputFile, "%% All Dialyzer options should be defined in dialyzer_options\n" "%% file.\n\n" "-module(~s).\n\n" - "-include(\"ct.hrl\").\n" + "-include_lib(\"common_test/include/ct.hrl\").\n" "-include(\"dialyzer_test_constants.hrl\").\n\n" "-export([suite/0, init_per_suite/0, init_per_suite/1,\n" " end_per_suite/1, all/0]).\n" |