From 4a6edd6f6ffe820db595dfa1f2c43311f6581ca7 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 19 Sep 2012 14:45:55 +0200 Subject: [reltool] Use application name from .app file instead of directory name In the first traversal of library directories, reltool used only the directory names in order to figure out application names. This would succeed if the directory name was AppName only or AppName-AppVsn and AppVsn consisted of integers separated by dots only. If the AppVsn has any other format, then reltool would not find the correct application name. With this commit, reltool will first look for a .app file and use the .app file name as the application name. This will allow different formats of the version identifier in the directory name. Note that reltool can still not sort (and select the latest) amongst version identifiers of other format than integers separated by dots. --- .../non_standard_vsn_id/b-first/ebin/b.app | 6 ++++++ .../reltool_server_SUITE_data/non_standard_vsn_id/b-first/src/b.erl | 4 ++++ .../non_standard_vsn_id/b-second/ebin/b.app | 6 ++++++ .../non_standard_vsn_id/b-second/src/b.erl | 4 ++++ 4 files changed, 20 insertions(+) create mode 100644 lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/ebin/b.app create mode 100644 lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/src/b.erl create mode 100644 lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/ebin/b.app create mode 100644 lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/src/b.erl (limited to 'lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id') diff --git a/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/ebin/b.app b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/ebin/b.app new file mode 100644 index 0000000000..55550a8190 --- /dev/null +++ b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/ebin/b.app @@ -0,0 +1,6 @@ +%% -*- erlang -*- +{application, b, + [{description, "Reltool test app for using selected version of app"}, + {vsn, "first"}, + {modules, [b]}, + {applications, [kernel, stdlib]}]}. diff --git a/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/src/b.erl b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/src/b.erl new file mode 100644 index 0000000000..a6b4ff1c05 --- /dev/null +++ b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-first/src/b.erl @@ -0,0 +1,4 @@ +-module(b). +-compile(export_all). + +foo() -> ok. diff --git a/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/ebin/b.app b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/ebin/b.app new file mode 100644 index 0000000000..91e1365df7 --- /dev/null +++ b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/ebin/b.app @@ -0,0 +1,6 @@ +%% -*- erlang -*- +{application, b, + [{description, "Reltool test app for using selected version of app"}, + {vsn, "second"}, + {modules, [b]}, + {applications, [kernel, stdlib]}]}. diff --git a/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/src/b.erl b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/src/b.erl new file mode 100644 index 0000000000..a6b4ff1c05 --- /dev/null +++ b/lib/reltool/test/reltool_server_SUITE_data/non_standard_vsn_id/b-second/src/b.erl @@ -0,0 +1,4 @@ +-module(b). +-compile(export_all). + +foo() -> ok. -- cgit v1.2.3