-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("yaws.hrl").
-include("yaws_api.hrl").

-define(top_srcdir,   "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6").
-define(top_builddir, "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6").
-define(srcdir,       "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/src").
-define(ebindir,      "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/ebin").
-define(ts_srcdir,    "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/testsuite").
-define(ts_builddir,  "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/testsuite").
-define(wwwdir,       "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/www").
-define(ssldir,       "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/ssl").
-define(sslkeyfile,   "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/ssl/yaws-key.pem").
-define(sslcertfile,  "/tmp/pkgbuild/www/yaws/work.alpha/yaws-2.0.6/ssl/yaws-cert.pem").

-define(data_srcdir  (SuiteName), filename:join(?ts_srcdir,   atom_to_list(SuiteName) ++ "_data")).
-define(data_builddir(SuiteName), filename:join(?ts_builddir, atom_to_list(SuiteName) ++ "_data")).

-define(templatedir(SuiteName), filename:join(?data_srcdir(SuiteName),   "templates")).
-define(tempdir    (SuiteName), filename:join(?data_builddir(SuiteName), "temp")).

-ifdef(SHOW_LOG).

-define(LOG(Fmt),       io:format(standard_error, Fmt, [])).
-define(LOG(Fmt, Args), io:format(standard_error, Fmt, Args)).

-else.

-define(LOG(Fmt),       io_lib:format(Fmt, [])).
-define(LOG(Fmt, Args), io_lib:format(Fmt, Args)).

-endif.

-define(GET_ENV(VarName), case os:getenv(VarName) of
                              false -> "";
                              _     -> os:getenv(VarName)
                          end).
