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

        # 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-main',
            includes='.',
            install_prefix=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']),
            use='daemon-objects unit-tests-main',
            includes='.',
            install_prefix=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')

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