# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-

"""
Copyright (c) 2014  Regents of the University of California,
                    Arizona Board of Regents,
                    Colorado State University,
                    University Pierre & Marie Curie, Sorbonne University,
                    Washington University in St. Louis,
                    Beijing Institute of Technology

This file is part of NFD (Named Data Networking Forwarding Daemon).
See AUTHORS.md for complete list of NFD authors and contributors.

NFD is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.

NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
"""

top = '..'

def build(bld):
    # Unit tests
    if bld.env['WITH_TESTS']:

        # common test modules
        unit_test_base = bld(
            target='unit-tests-base',
            name='unit-tests-base',
            features='cxx pch',
            source=bld.path.ant_glob(['*.cpp'], excl='main.cpp'),
            use='core-objects',
            headers='../common.hpp boost-test.hpp',
            defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % bld.bldnode,
          )

        for module, name in {"core": "NFD Core Tests",
                             "daemon": "NFD Daemon Tests",
                             "rib": "NFD RIB Tests"}.items():
            # main()
            bld(target='unit-tests-%s-main' % module,
                name='unit-tests-%s-main' % module,
                features='cxx',
                use='BOOST',
                source='main.cpp',
                defines=['BOOST_TEST_MODULE=%s' % name]
              )

            # unit-tests-%module
            unit_tests = bld.program(
                target='../unit-tests-%s' % module,
                features='cxx cxxprogram',
                source=bld.path.ant_glob(['%s/**/*.cpp' % module],
                                         excl=['%s/**/ethernet*.cpp' % module,
                                               '%s/**/unix*.cpp' % module,
                                               '%s/**/websocket*.cpp' % module]),
                use='%s-objects unit-tests-base unit-tests-%s-main' % (module, module),
                includes='.',
                install_path=None,
                defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % bld.bldnode,
              )

            if bld.env['HAVE_LIBPCAP']:
                unit_tests.source += bld.path.ant_glob('%s/**/ethernet*.cpp' % module)

            if bld.env['HAVE_UNIX_SOCKETS']:
                unit_tests.source += bld.path.ant_glob('%s/**/unix*.cpp' % module)

            if bld.env['HAVE_WEBSOCKET']:
                unit_tests.source += bld.path.ant_glob('%s/**/websocket*.cpp' % module)

    # Other tests (e.g., stress tests that can be enabled even if unit tests are disabled)
    if bld.env['WITH_TESTS'] or bld.env['WITH_OTHER_TESTS']:
        bld.recurse("other")
