diff options
author | Tristan Sloughter <t@crashfast.com> | 2017-07-14 09:45:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-14 09:45:20 -0700 |
commit | baa369884ddc6d0449be76517fc292fe8d59aef5 (patch) | |
tree | 8f283648a5248ba3a99c1a013caeaf2ae0a9f06a /src/rebar_prv_common_test.erl | |
parent | 2326ad016c5e9ef941ae81e9b11a4cfedf15ff6f (diff) | |
parent | e4f5b55557c8f21b2526216cd38fea0aa91c53f0 (diff) |
Merge pull request #1587 from tsloughter/ct-compile-only
add compile_only option to ct provider
Diffstat (limited to 'src/rebar_prv_common_test.erl')
-rw-r--r-- | src/rebar_prv_common_test.erl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index 3df8b75..dfade77 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -41,7 +41,14 @@ do(State) -> Tests = prepare_tests(State), case compile(State, Tests) of %% successfully compiled apps - {ok, S} -> do(S, Tests); + {ok, S} -> + {RawOpts, _} = rebar_state:command_parsed_args(S), + case proplists:get_value(compile_only, RawOpts, false) of + true -> + {ok, S}; + false -> + do(S, Tests) + end; %% this should look like a compiler error, not a ct error Error -> Error end. @@ -743,9 +750,12 @@ ct_opts(_State) -> {name, undefined, "name", atom, help(name)}, {sname, undefined, "sname", atom, help(sname)}, {setcookie, undefined, "setcookie", atom, help(setcookie)}, - {sys_config, undefined, "sys_config", string, help(sys_config)} %% comma-separated list + {sys_config, undefined, "sys_config", string, help(sys_config)}, %% comma-separated list + {compile_only, undefined, "compile_only", boolean, help(compile_only)} ]. +help(compile_only) -> + "Compile modules in the project with the test configuration but do not run the tests"; help(dir) -> "List of additional directories containing test suites"; help(suite) -> |