Просмотр исходного кода

fix(test): use a real copy of BUILD_INFO for testing

On macOS, apparently symlinks can cause problems when rebar3 tries to
copy files to the `_build` directory.  So we now use a copy of
`rel/BUILD_INFO`.  Unfortunately, this has the downside of this copy
possibly going stale over time.
Thales Macedo Garitezi 3 лет назад
Родитель
Сommit
7e3b9bb356

+ 1 - 1
apps/emqx_modules/test/emqx_telemetry_SUITE.erl

@@ -47,7 +47,7 @@ init_per_testcase(t_get_telemetry, Config) ->
         emqx_telemetry,
         read_raw_build_info,
         fun() ->
-            {ok, Path} = file:read_link(filename:join([DataDir, "BUILD_INFO"])),
+            Path = filename:join([DataDir, "BUILD_INFO"]),
             {ok, Template} = file:read_file(Path),
             Vars0 = [
                 {build_info_arch, "arch"},

+ 0 - 1
apps/emqx_modules/test/emqx_telemetry_SUITE_data/BUILD_INFO

@@ -1 +0,0 @@
-../../../../rel/BUILD_INFO

+ 6 - 0
apps/emqx_modules/test/emqx_telemetry_SUITE_data/BUILD_INFO

@@ -0,0 +1,6 @@
+arch: "{{ build_info_arch }}"
+wordsize: {{ build_info_wordsize }}
+os: "{{ build_info_os }}"
+erlang: "{{ build_info_erlang }}"
+elixir: "{{ build_info_elixir }}"
+relform: "{{ build_info_relform }}"