Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Refactor SConscript for test/windows directory
Change-Id: I2d2c4d955abf40d7617006ce1e0b7a32ecad2222
Partial-Bug: #1737177
  • Loading branch information
jablonskim committed Jul 9, 2018
1 parent b3d243e commit 50c8296
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions test/windows/SConscript
Expand Up @@ -23,24 +23,18 @@ env.AppendENVPath('Path', Dir('#build/bin'))
common_tests_src = ['fake_win_packet_raw.c', 'fake_win_memory.c', 'fake_vrouter.c']
common_tests_obj = env.Object(common_tests_src)

win_packet_clone_tests_src = ['test_win_packet_clone.c'] + common_tests_obj
win_packet_clone_tests = env.UnitTest('win_packet_clone_tests', win_packet_clone_tests_src)

win_packet_free_tests_src = ['test_win_packet_free.c'] + common_tests_obj
win_packet_free_tests = env.UnitTest('win_packet_free_tests', win_packet_free_tests_src)

win_pclone_tests_src = ['test_win_pclone.c'] + common_tests_obj
win_pclone_tests = env.UnitTest('win_pclone_tests', win_pclone_tests_src)

win_pfree_tests_src = ['test_win_pfree.c'] + common_tests_obj
win_pfree_tests = env.UnitTest('win_pfree_tests', win_pfree_tests_src)

test_suites = [
win_packet_clone_tests,
win_packet_free_tests,
win_pclone_tests,
win_pfree_tests,
test_suite_base_names = [
'win_packet_clone',
'win_packet_free',
'win_pclone',
'win_pfree',
]

test_suites = []
for test_suite_name in test_suite_base_names:
test_suite_src = ['test_{}.c'.format(test_suite_name)] + common_tests_obj
test_suite = env.UnitTest('{}_tests'.format(test_suite_name), test_suite_src)
test_suites.append(test_suite)

kernel_tests = env.TestSuite('kernel-tests', test_suites)
env.Requires(kernel_tests, '#build/bin/cmocka.dll')

0 comments on commit 50c8296

Please sign in to comment.