fix(emqx): ensure that standalone build works

Turns out rebar3 `path` resource has troubles with dangling
symlinks and non-ASCII filenames. 🥲
This commit is contained in:
Andrew Mayorov 2023-06-02 20:03:59 +03:00
parent 1cb226dffb
commit 8a31e5639b
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
5 changed files with 12 additions and 16 deletions

View File

@ -59,12 +59,12 @@
{statistics, true}
]}.
{project_plugins, [
{erlfmt, [
{files, [
"{src,include,test}/*.{hrl,erl,app.src}",
"rebar.config",
"rebar.config.script"
]}
{project_plugins, [erlfmt]}.
{erlfmt, [
{files, [
"{src,include,test}/*.{hrl,erl,app.src}",
"rebar.config",
"rebar.config.script"
]}
]}.

View File

@ -33,16 +33,13 @@ t_traverse_dir(Config) ->
Traversal = lists:sort(emqx_utils_fs:traverse_dir(fun cons_fileinfo/3, [], Dir)),
?assertMatch(
[
{"nonempty/d1/1", #file_info{type = regular, mode = ORWAR}},
{"nonempty/d1/2", #file_info{type = regular, mode = ORWAR}},
{"nonempty/d1/1", #file_info{type = regular}},
{"nonempty/d1/2", #file_info{type = regular}},
{"nonempty/d1/mutrec", #file_info{type = symlink, mode = ARWX}},
{"nonempty/d1/файл", #file_info{type = regular}},
{"nonempty/d2/deep/down/here", #file_info{type = regular, mode = ORW}},
{"nonempty/d2/deep/mutrec", #file_info{type = symlink, mode = ARWX}},
{"nonempty/д3", #file_info{type = symlink, mode = ARWX}}
{"nonempty/d2/deep/mutrec", #file_info{type = symlink, mode = ARWX}}
] when
((ORWAR band 8#00644 =:= 8#00644) and
(ORW band 8#00600 =:= 8#00600) and
((ORW band 8#00600 =:= 8#00600) and
(ARWX band 8#00777 =:= 8#00777)),
[{string:prefix(Filename, Dir), Info} || {Filename, Info} <- Traversal]

View File

@ -1 +1 @@
../../empty
../d2/deep/down