Whitespace
This commit is contained in:
parent
ba41dd7fb6
commit
941bb0a929
1 changed files with 20 additions and 20 deletions
|
@ -63,7 +63,7 @@
|
||||||
verify/2,
|
verify/2,
|
||||||
verify/3,
|
verify/3,
|
||||||
config_value/3,
|
config_value/3,
|
||||||
priv_dir/0,
|
priv_dir/0,
|
||||||
fold_keys/3,
|
fold_keys/3,
|
||||||
fold/3]).
|
fold/3]).
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ nif_stub_error(Line) ->
|
||||||
-spec init() -> ok | {error, any()}.
|
-spec init() -> ok | {error, any()}.
|
||||||
init() ->
|
init() ->
|
||||||
erlang:load_nif(filename:join([priv_dir(), atom_to_list(?MODULE)]),
|
erlang:load_nif(filename:join([priv_dir(), atom_to_list(?MODULE)]),
|
||||||
[{wterl, "07061ed6e8252543c2f06b81a646eca6945cc558"},
|
[{wterl, "07061ed6e8252543c2f06b81a646eca6945cc558"},
|
||||||
{wiredtiger, "6f7a4b961c744bfb21f0c21d4c28c2d162400f1b"}]).
|
{wiredtiger, "6f7a4b961c744bfb21f0c21d4c28c2d162400f1b"}]).
|
||||||
|
|
||||||
-spec connection_open(string(), config_list()) -> {ok, connection()} | {error, term()}.
|
-spec connection_open(string(), config_list()) -> {ok, connection()} | {error, term()}.
|
||||||
-spec connection_open(string(), config_list(), config_list()) -> {ok, connection()} | {error, term()}.
|
-spec connection_open(string(), config_list(), config_list()) -> {ok, connection()} | {error, term()}.
|
||||||
|
@ -106,12 +106,12 @@ connection_open(HomeDir, ConnectionConfig, SessionConfig) ->
|
||||||
PrivDir = wterl:priv_dir(),
|
PrivDir = wterl:priv_dir(),
|
||||||
{ok, PrivFiles} = file:list_dir(PrivDir),
|
{ok, PrivFiles} = file:list_dir(PrivDir),
|
||||||
SoFiles =
|
SoFiles =
|
||||||
lists:filter(fun(Elem) ->
|
lists:filter(fun(Elem) ->
|
||||||
case re:run(Elem, "^libwiredtiger_.*\.so$") of
|
case re:run(Elem, "^libwiredtiger_.*\.so$") of
|
||||||
{match, _} -> true;
|
{match, _} -> true;
|
||||||
nomatch -> false
|
nomatch -> false
|
||||||
end
|
end
|
||||||
end, PrivFiles),
|
end, PrivFiles),
|
||||||
SoPaths = lists:map(fun(Elem) -> filename:join([PrivDir, Elem]) end, SoFiles),
|
SoPaths = lists:map(fun(Elem) -> filename:join([PrivDir, Elem]) end, SoFiles),
|
||||||
conn_open(HomeDir, [{extensions, SoPaths}] ++ ConnectionConfig, SessionConfig).
|
conn_open(HomeDir, [{extensions, SoPaths}] ++ ConnectionConfig, SessionConfig).
|
||||||
|
|
||||||
|
@ -394,12 +394,12 @@ fold(Cursor, Fun, Acc, {ok, Key, Value}) ->
|
||||||
|
|
||||||
priv_dir() ->
|
priv_dir() ->
|
||||||
case code:priv_dir(?MODULE) of
|
case code:priv_dir(?MODULE) of
|
||||||
{error, bad_name} ->
|
{error, bad_name} ->
|
||||||
EbinDir = filename:dirname(code:which(?MODULE)),
|
EbinDir = filename:dirname(code:which(?MODULE)),
|
||||||
AppPath = filename:dirname(EbinDir),
|
AppPath = filename:dirname(EbinDir),
|
||||||
filename:join([AppPath, "priv"]);
|
filename:join([AppPath, "priv"]);
|
||||||
Path ->
|
Path ->
|
||||||
Path
|
Path
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
@ -524,7 +524,7 @@ remove_all_files(Dir, Files) ->
|
||||||
{ok, FileInfo} ->
|
{ok, FileInfo} ->
|
||||||
case FileInfo#file_info.type of
|
case FileInfo#file_info.type of
|
||||||
directory ->
|
directory ->
|
||||||
{ok, DirFiles} = file:list_dir(FilePath),
|
{ok, DirFiles} = file:list_dir(FilePath),
|
||||||
remove_all_files(FilePath, DirFiles),
|
remove_all_files(FilePath, DirFiles),
|
||||||
file:del_dir(FilePath);
|
file:del_dir(FilePath);
|
||||||
_ ->
|
_ ->
|
||||||
|
@ -874,11 +874,11 @@ prop_put_delete() ->
|
||||||
begin
|
begin
|
||||||
DataDir = "test/wterl.putdelete.qc",
|
DataDir = "test/wterl.putdelete.qc",
|
||||||
Table = "table:eqc",
|
Table = "table:eqc",
|
||||||
{ok, CWD} = file:get_cwd(),
|
{ok, CWD} = file:get_cwd(),
|
||||||
?assertMatch(true, lists:suffix("wterl/.eunit", CWD)),
|
?assertMatch(true, lists:suffix("wterl/.eunit", CWD)),
|
||||||
?cmd("rm -rf "++DataDir),
|
?cmd("rm -rf "++DataDir),
|
||||||
ok = filelib:ensure_dir(filename:join([DataDir, "x"])),
|
ok = filelib:ensure_dir(filename:join([DataDir, "x"])),
|
||||||
{ok, Conn} = wterl:connection_open(DataDir, [{create,true}]),
|
{ok, ConnRef} = wterl:connection_open(DataDir, [{create,true}]),
|
||||||
try
|
try
|
||||||
wterl:create(ConnRef, Table),
|
wterl:create(ConnRef, Table),
|
||||||
Model = apply_kv_ops(Ops, ConnRef, Table, []),
|
Model = apply_kv_ops(Ops, ConnRef, Table, []),
|
||||||
|
@ -892,7 +892,7 @@ prop_put_delete() ->
|
||||||
lists:map(F, Model),
|
lists:map(F, Model),
|
||||||
true
|
true
|
||||||
after
|
after
|
||||||
wterl:connection_close(Conn)
|
wterl:connection_close(ConnRef)
|
||||||
end
|
end
|
||||||
end)).
|
end)).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue