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.
This commit is contained in:
Thales Macedo Garitezi 2022-03-23 09:14:30 -03:00
parent bbb3cc6abf
commit 7e3b9bb356
No known key found for this signature in database
GPG Key ID: DD279F8152A9B6DD
2 changed files with 7 additions and 2 deletions

View File

@ -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"},

View File

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

View File

@ -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 }}"