# -*- 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']:
        # main()
        unit_test_main = bld(
            target='unit-tests-main',
            name='unit-tests-main',
            features='cxx',
            use='core-objects',
            source='main.cpp',
          )

        # 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',
          )

        # core tests
        unit_tests_core = bld.program(
            target='../unit-tests-core',
            features='cxx cxxprogram',
            source=bld.path.ant_glob(['core/**/*.cpp']),
            use='core-objects unit-tests-base unit-tests-main',
            includes='.',
            install_path=None,
          )

        # NFD tests
        unit_tests_nfd = bld.program(
            target='../unit-tests-daemon',
            features='cxx cxxprogram',
            source=bld.path.ant_glob(['daemon/**/*.cpp'],
                                     excl=['daemon/face/ethernet*.cpp',
                                           'daemon/face/unix*.cpp',
                                           'daemon/face/websocket*.cpp']),
            use='daemon-objects unit-tests-base unit-tests-main',
            includes='.',
            install_path=None,
          )

        if bld.env['HAVE_LIBPCAP']:
            unit_tests_nfd.source += bld.path.ant_glob('daemon/face/ethernet*.cpp')

        if bld.env['HAVE_UNIX_SOCKETS']:
            unit_tests_nfd.source += bld.path.ant_glob('daemon/face/unix*.cpp')

        if bld.env['HAVE_WEBSOCKET']:
            unit_tests_nfd.source += bld.path.ant_glob('daemon/face/websocket*.cpp')

        unit_tests_rib = bld.program(
            target='../unit-tests-rib',
            features='cxx cxxprogram',
            source=bld.path.ant_glob(['rib/**/*.cpp']),
            use='rib-objects unit-tests-base unit-tests-main',
            includes='.',
            install_path=None,
          )

    # 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")
