Blob Blame History Raw
From: Martin Cox <me@mar.tin.cx>
Date: Thu, 28 Dec 2017 21:32:38 +0000
Subject: [PATCH] Add nowarn_export_all to tests to suppress errors for otp20
 compatibility.

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>

diff --git a/src/cuttlefish.erl b/src/cuttlefish.erl
index 90caa6a..42170d6 100644
--- a/src/cuttlefish.erl
+++ b/src/cuttlefish.erl
@@ -25,6 +25,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -export([
diff --git a/src/cuttlefish_advanced.erl b/src/cuttlefish_advanced.erl
index d089daa..7258261 100644
--- a/src/cuttlefish_advanced.erl
+++ b/src/cuttlefish_advanced.erl
@@ -27,6 +27,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 %% @doc this function overlays the values in proplist 'AdvancedConfig'
diff --git a/src/cuttlefish_bytesize.erl b/src/cuttlefish_bytesize.erl
index 5262a52..d801006 100644
--- a/src/cuttlefish_bytesize.erl
+++ b/src/cuttlefish_bytesize.erl
@@ -29,6 +29,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -export([parse/1, to_string/1]).
diff --git a/src/cuttlefish_conf.erl b/src/cuttlefish_conf.erl
index 616f7a5..367b9b1 100644
--- a/src/cuttlefish_conf.erl
+++ b/src/cuttlefish_conf.erl
@@ -207,6 +207,7 @@ remove_duplicates(Conf) ->
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -ifdef(TEST).
diff --git a/src/cuttlefish_datatypes.erl b/src/cuttlefish_datatypes.erl
index f79779e..f8db145 100644
--- a/src/cuttlefish_datatypes.erl
+++ b/src/cuttlefish_datatypes.erl
@@ -24,6 +24,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -type datatype() :: integer |
diff --git a/src/cuttlefish_duration.erl b/src/cuttlefish_duration.erl
index 06ec15d..65ce20b 100644
--- a/src/cuttlefish_duration.erl
+++ b/src/cuttlefish_duration.erl
@@ -29,6 +29,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -export([parse/1, parse/2, to_string/2]).
diff --git a/src/cuttlefish_effective.erl b/src/cuttlefish_effective.erl
index c992734..b8dd794 100644
--- a/src/cuttlefish_effective.erl
+++ b/src/cuttlefish_effective.erl
@@ -28,6 +28,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -spec build(cuttlefish_conf:conf(), cuttlefish_schema:schema(), [proplists:property()]) -> [string()].
diff --git a/src/cuttlefish_enum.erl b/src/cuttlefish_enum.erl
index 0b5eb18..574027f 100644
--- a/src/cuttlefish_enum.erl
+++ b/src/cuttlefish_enum.erl
@@ -31,6 +31,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -export([
diff --git a/src/cuttlefish_error.erl b/src/cuttlefish_error.erl
index 3a76010..4107a75 100644
--- a/src/cuttlefish_error.erl
+++ b/src/cuttlefish_error.erl
@@ -38,6 +38,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 %% We'll be calling this a lot from `xlate'
diff --git a/src/cuttlefish_escript.erl b/src/cuttlefish_escript.erl
index 81c932c..b57b3f7 100644
--- a/src/cuttlefish_escript.erl
+++ b/src/cuttlefish_escript.erl
@@ -28,6 +28,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 cli_options() ->
diff --git a/src/cuttlefish_flag.erl b/src/cuttlefish_flag.erl
index b0f6045..a4e6720 100644
--- a/src/cuttlefish_flag.erl
+++ b/src/cuttlefish_flag.erl
@@ -26,6 +26,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -export([
diff --git a/src/cuttlefish_generator.erl b/src/cuttlefish_generator.erl
index dc7c02f..8483204 100644
--- a/src/cuttlefish_generator.erl
+++ b/src/cuttlefish_generator.erl
@@ -24,6 +24,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -define(FMT(F,A), lists:flatten(io_lib:format(F,A))).
diff --git a/src/cuttlefish_mapping.erl b/src/cuttlefish_mapping.erl
index 3207c25..44df65f 100644
--- a/src/cuttlefish_mapping.erl
+++ b/src/cuttlefish_mapping.erl
@@ -24,6 +24,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -record(mapping, {
diff --git a/src/cuttlefish_schema.erl b/src/cuttlefish_schema.erl
index 2185fa9..b1b209c 100644
--- a/src/cuttlefish_schema.erl
+++ b/src/cuttlefish_schema.erl
@@ -30,8 +30,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
-
-
+-compile(nowarn_export_all).
 -endif.
 
 -type schema() :: {
diff --git a/src/cuttlefish_translation.erl b/src/cuttlefish_translation.erl
index 5ce558d..f579558 100644
--- a/src/cuttlefish_translation.erl
+++ b/src/cuttlefish_translation.erl
@@ -24,6 +24,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -record(translation, {
diff --git a/src/cuttlefish_unit.erl b/src/cuttlefish_unit.erl
index 825cc79..5195705 100644
--- a/src/cuttlefish_unit.erl
+++ b/src/cuttlefish_unit.erl
@@ -1,23 +1,8 @@
 -module(cuttlefish_unit).
 
 -include_lib("eunit/include/eunit.hrl").
--export([   generate_templated_config/3, 
-            render_template/2, 
-            generate_config/3,
-            assert_valid_config/1,
-            assert_config/3,
-            assert_not_configured/2,
-            assert_error/1,
-            assert_error_in_phase/2,
-            assert_error/3,
-            assert_errors/2,
-            assert_errors/3,
-            assert_error_message/2,
-            chase_message/3,
-            path/2,
-            key_no_match/1,
-            dump_to_file/2
-            ]).
+-compile(export_all).
+-compile(nowarn_export_all).
 
 generate_templated_config(FileName, Conf, Context) ->
     generate_templated_config(FileName, Conf, Context, {[], [], []}).
diff --git a/src/cuttlefish_util.erl b/src/cuttlefish_util.erl
index b1c8e28..bf54a77 100644
--- a/src/cuttlefish_util.erl
+++ b/src/cuttlefish_util.erl
@@ -24,6 +24,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -export([
diff --git a/src/cuttlefish_validator.erl b/src/cuttlefish_validator.erl
index 4d6c29e..2a7503d 100644
--- a/src/cuttlefish_validator.erl
+++ b/src/cuttlefish_validator.erl
@@ -24,6 +24,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -record(validator, {
diff --git a/src/cuttlefish_variable.erl b/src/cuttlefish_variable.erl
index 76fa181..419a6e5 100644
--- a/src/cuttlefish_variable.erl
+++ b/src/cuttlefish_variable.erl
@@ -31,6 +31,7 @@
 -endif.
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 -export([
diff --git a/src/cuttlefish_vmargs.erl b/src/cuttlefish_vmargs.erl
index 5eca3e8..117c646 100644
--- a/src/cuttlefish_vmargs.erl
+++ b/src/cuttlefish_vmargs.erl
@@ -5,6 +5,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 -endif.
 
 %% @doc turns a proplist into a list of strings suitable for vm.args files
diff --git a/test/cuttlefish_escript_integration_tests.erl b/test/cuttlefish_escript_integration_tests.erl
index e4e4682..2735460 100644
--- a/test/cuttlefish_escript_integration_tests.erl
+++ b/test/cuttlefish_escript_integration_tests.erl
@@ -2,6 +2,7 @@
 
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 
 escript_utf8_test() ->
     cuttlefish_lager_test_backend:bounce(error),
diff --git a/test/cuttlefish_escript_test.erl b/test/cuttlefish_escript_test.erl
index 2d9e8c0..202cb2c 100644
--- a/test/cuttlefish_escript_test.erl
+++ b/test/cuttlefish_escript_test.erl
@@ -2,6 +2,7 @@
 -ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 
 -define(assertPrinted(___Text),
         begin
diff --git a/test/cuttlefish_integration_test.erl b/test/cuttlefish_integration_test.erl
index 12e40cb..7f74f85 100644
--- a/test/cuttlefish_integration_test.erl
+++ b/test/cuttlefish_integration_test.erl
@@ -2,6 +2,7 @@
 
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 
 %% This test generates a default .conf file from the riak.schema. view it at ../generated.conf
 generated_conf_file_test() ->
diff --git a/test/cuttlefish_nested_schema_test.erl b/test/cuttlefish_nested_schema_test.erl
index 50065bd..b4270ac 100644
--- a/test/cuttlefish_nested_schema_test.erl
+++ b/test/cuttlefish_nested_schema_test.erl
@@ -2,6 +2,7 @@
 
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 
 nested_schema_test() ->
     Conf = [
diff --git a/test/erlang_vm_schema_tests.erl b/test/erlang_vm_schema_tests.erl
index 292778d..5945009 100644
--- a/test/erlang_vm_schema_tests.erl
+++ b/test/erlang_vm_schema_tests.erl
@@ -2,6 +2,7 @@
 
 -include_lib("eunit/include/eunit.hrl").
 -compile(export_all).
+-compile(nowarn_export_all).
 
 %% basic schema test will check to make sure that all defaults from the schema
 %% make it into the generated app.config