# -*- mode: python; -*-
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

Import('BuildEnv')

import sys

env = BuildEnv.Clone()

AddOption('--with-libvirt', dest='with_libvirt', action='store_true',
          default=False, help='whether compile with libvirt or not')

subdirs = ['agent',
]

for dir in subdirs:
    env.SConscript(dir + '/SConscript', exports='BuildEnv',
                   variant_dir=BuildEnv['TOP'] + '/vnsw/' + dir,
                   duplicate=0)

noarch_subdirs = [
    'contrail-vrouter-api',
    'opencontrail-vrouter-netns',
    'provisioning'
]

for sdir in noarch_subdirs:
    BuildEnv.SConscript('%s/SConscript' % sdir, exports='BuildEnv',
                       variant_dir='#build/noarch/%s' % sdir,
                       duplicate = 1)

env.Alias('controller/src/agent:test', [
    'controller/src/vnsw/agent/cmn:test',
    'controller/src/vnsw/agent/diag:test',
#   'controller/src/vnsw/agent/filter:test',
#   'controller/src/vnsw/agent/init:test',
    'controller/src/vnsw/agent/kstate:test',
    'controller/src/vnsw/agent/ksync:test',
    'controller/src/vnsw/agent/port_ipc:test',
    'controller/src/vnsw/agent/oper:test',
    'controller/src/vnsw/agent/pkt:test',
    'controller/src/vnsw/agent/services:test',
    'controller/src/vnsw/agent:test',
    'controller/src/vnsw/agent/uve:test',
    'controller/src/vnsw/agent/vgw:test',
])

#Commented flaky-test are not having any flaky-test.
env.Alias('controller/src/agent:flaky-test', [
#    'controller/src/vnsw/agent/cmn:flaky_test',
#    'controller/src/vnsw/agent/diag:flaky_test',
    'controller/src/vnsw/agent/filter:flaky_test',
#    'controller/src/vnsw/agent/init:flaky_test',
    'controller/src/vnsw/agent/kstate:flaky_test',
    'controller/src/vnsw/agent/ksync:flaky_test',
    'controller/src/vnsw/agent/oper:flaky_test',
    'controller/src/vnsw/agent/pkt:flaky_test',
    'controller/src/vnsw/agent/services:flaky_test',
    'controller/src/vnsw/agent:flaky_test',
    'controller/src/vnsw/agent/uve:flaky_test',
#    'controller/src/vnsw/agent/vgw:flaky_test',
])
