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

fix(emqx): ensure that standalone build works

Turns out rebar3 `path` resource has troubles with dangling
symlinks and non-ASCII filenames. 🥲
Andrew Mayorov 2 лет назад
Родитель
Сommit
8a31e5639b

+ 7 - 7
apps/emqx/rebar.config

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

+ 4 - 7
apps/emqx_utils/test/emqx_utils_fs_SUITE.erl

@@ -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]

+ 1 - 1
apps/emqx_utils/test/emqx_utils_fs_SUITE_data/nonempty/d1/mutrec

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

+ 0 - 0
apps/emqx_utils/test/emqx_utils_fs_SUITE_data/nonempty/d1/файл


+ 0 - 1
apps/emqx_utils/test/emqx_utils_fs_SUITE_data/nonempty/д3

@@ -1 +0,0 @@
-../dx