%% -*- erlang -*-
%%==============================================================================
%% Copyright 2014 Ulf Wiger
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%==============================================================================
RelDir = filename:join(CWD, "releases").
[
 {name, "test"},
 {root, filename:join(CWD, "testapp-?/_build/default/lib")},
 {env, [{sasl, [{releases_dir, RelDir}]}
       ]},
 {apps,
  [kernel,
   stdlib,
   sasl,
   setup,
   {snmp,load},
   {testapp, "1", [snmp]}
  ]},
 %% Assume CWD is the 'setup' top directory
 {include, "xtest/test_1.conf"},            % {env, [{setup, ...}]}
 {include_lib, "setup/xtest/test_2.conf"},  % env: a,'$setup_vars' in testapp
 {include_lib, "setup/xtest/test_3.conf", [{'MyVar', "My Var"}]},
 {include, "xtest/test_4.conf", [{'MyVar2', "My Var 2"}]},
 {env, [{testapp, [{b, "$INT122"},
                   {c, 0},
                   {d, [{a, 1},
                        {b, whatever, [{a, [{a, 1},
                                            {b, 2}]}]},
                        {c, 3}]},
                   {e, {'$value', "$INT124"}},
                   {shell, "$SHELL"},
                   {myhome, "$HOME/me"},
                   {mypriv, "$PRIV_DIR/me"}
                  ]}
       ]},
 {set_env, [{testapp, [{[d,b,a,b], 17},
                       {[c,a,b], 5}]}]}
].
