aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/systools_SUITE_data
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <[email protected]>2014-03-19 15:19:19 +0100
committerJean-Sébastien Pédron <[email protected]>2014-03-24 17:37:29 +0100
commitf149194f227fd593757ff2c750b82b62f9a6e8aa (patch)
treef1ac375ec02f2673cf5e03e1b40a9ecaa3503b85 /lib/sasl/test/systools_SUITE_data
parent8acc644e162bad52f7ab81c76c0cad15628e4f3d (diff)
downloadotp-f149194f227fd593757ff2c750b82b62f9a6e8aa.tar.gz
otp-f149194f227fd593757ff2c750b82b62f9a6e8aa.tar.bz2
otp-f149194f227fd593757ff2c750b82b62f9a6e8aa.zip
sasl: Fix crash in systools_make:format_error/1
The crash occurred when systools:make_script/2 raises the 'duplicate_modules' error. Depending on the 'silent' option, systools_make:format_error/1 is called to either format and display an error message, or return a tuple containing the error properties. When displaying a 'duplicate_modules' error message, format_error/1 receives a list of applications providing the same module(s): [ {{Mod,App1,_}, {Mod,App2,_}}, ... ] However, before this fix, format_error/1 expected the following structure, leading to a 'function_clause' exception: [ {{Mod,_,App1,_,_}, {Mod,_,App2,_,_}}, ... ] The crash never occurred with the 'silent' option, because the error and its properties are returned as is to the caller.
Diffstat (limited to 'lib/sasl/test/systools_SUITE_data')
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app7
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl2
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app7
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl2
4 files changed, 18 insertions, 0 deletions
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app
new file mode 100644
index 0000000000..dea9257f2f
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app
@@ -0,0 +1,7 @@
+{application, app1,
+ [{description, "Application 1"},
+ {vsn, "1.0"},
+ {modules, [myapp]},
+ {registered, []},
+ {applications, []},
+ {env, []}]}.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl
new file mode 100644
index 0000000000..bf2ab7c79c
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl
@@ -0,0 +1,2 @@
+-module(myapp).
+-vsn("1.0").
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app
new file mode 100644
index 0000000000..476750d8b2
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app
@@ -0,0 +1,7 @@
+{application, app2,
+ [{description, "Application 2"},
+ {vsn, "1.0"},
+ {modules, [myapp]},
+ {registered, []},
+ {applications, []},
+ {env, []}]}.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl
new file mode 100644
index 0000000000..bf2ab7c79c
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl
@@ -0,0 +1,2 @@
+-module(myapp).
+-vsn("1.0").