# -*- 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": "Core Tests",
                             "daemon": "Daemon Tests",
                             "rib": "RIB Tests",
                             "tools": "Tools 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")
