Skip to content

Commit

Permalink
todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Watson committed Jun 7, 2012
1 parent b385709 commit c4606b9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/systest_config.erl
Expand Up @@ -167,9 +167,6 @@ require(Key, Config) ->
Value
end.

%% TODO: move these API calls into the gen_server mechanism, so that we can
%% easily switch between common_test and stand-alone runs if we wish...

get_env() ->
gen_server:call(?MODULE, list).

Expand Down Expand Up @@ -250,10 +247,6 @@ terminate(_Reason, _State) ->
code_change(_OldVsn, State, _Extra) ->
{ok, State}.

%%
%% Private API
%%

merge(New, Existing) when is_tuple(New) ->
K = element(1, New),
case lists:keymember(K, 1, Existing) of
Expand All @@ -265,6 +258,7 @@ merge(New, Existing) when is_tuple(New) ->
merge(New, Existing) ->
append_if_missing(fun lists:member/2, New, Existing).

%% TODO: this head (clause) isn't used any more!?
extend({Path, Spec}=New, Existing) when Path =:= dir orelse
Path =:= file ->
%% TODO: this isn't very flexible - make it simpler to use...
Expand All @@ -283,6 +277,7 @@ extend({Path, Spec}=New, Existing) when Path =:= dir orelse
{[], ScratchDir}, Members),
[{Path, Rewrite(Value)}|Existing]
end;
%% TODO: deprecate 'extra' as it is no longer used
extend({extra, [{_, _, _}|_]=Stuff}, Existing) ->
Items = [{M,F,[hd(extend(A, Existing)) || A <- Args]} ||
{M,F,Args} <- Stuff],
Expand All @@ -302,6 +297,7 @@ extend({K, NewVal}=New, Existing) when is_list(NewVal) ->
_ ->
lists:keyreplace(K, 1, Existing, New)
end;
%% TODO: deprecate 'environment' tuples, as they're not longer used
extend({environment, _}=New, Existing) ->
[New|Existing];
extend({environment, _, _}=New, Existing) ->
Expand Down

0 comments on commit c4606b9

Please sign in to comment.