aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-01-20 06:51:10 +0000
committerErlang/OTP <[email protected]>2010-01-20 06:51:10 +0000
commit9bf84f381797df7411335fed11ee83886b09514f (patch)
tree8409c4b5ded2b5c4e67b86099ce15a4e75b875aa /erts/test
parentb408b344732b5a20d996d1cb88a40a3e46247271 (diff)
parent96773ebcef2fe5949695a4fd923343ec4b049087 (diff)
downloadotp-9bf84f381797df7411335fed11ee83886b09514f.tar.gz
otp-9bf84f381797df7411335fed11ee83886b09514f.tar.bz2
otp-9bf84f381797df7411335fed11ee83886b09514f.zip
Merge branch 'cf/compile_warning_as_error' into ccase/r13b04_dev
* cf/compile_warning_as_error: Add option -Werror in erlc(1) compile: add flag warnings_as_errors to treat warnings as errors compile.erl: remove trailing whitespace OTP-8382 The -Werror option for erlc and the compiler option warnings_as_errors will cause warnings to be treated as errors. (Thanks to Christopher Faulet.)
Diffstat (limited to 'erts/test')
-rw-r--r--erts/test/erlc_SUITE.erl17
1 files changed, 12 insertions, 5 deletions
diff --git a/erts/test/erlc_SUITE.erl b/erts/test/erlc_SUITE.erl
index 1d944811aa..6b4484b31e 100644
--- a/erts/test/erlc_SUITE.erl
+++ b/erts/test/erlc_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(erlc_SUITE).
@@ -56,6 +56,13 @@ compile_erl(Config) when is_list(Config) ->
?line run(Config, Cmd, FileName, "-W0", ["_OK_"]),
+ %% Try treating warnings as errors.
+
+ ?line run(Config, Cmd, FileName, "-Werror",
+ ["compile: warnings being treated as errors\$",
+ "Warning: function foo/0 is unused\$",
+ "_ERROR_"]),
+
%% Check a bad file.
?line BadFile = filename:join(SrcDir, "erl_test_bad.erl"),