SConscript (12313:6a633c9a8cfb) SConscript (12315:97321085f650)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 261 unchanged lines hidden (view full) ---

270 self.target = target
271 self.main = kwargs.get('main', False)
272 self.all.append(self)
273
274class GTest(UnitTest):
275 '''Create a unit test based on the google test framework.'''
276
277 all = []
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 261 unchanged lines hidden (view full) ---

270 self.target = target
271 self.main = kwargs.get('main', False)
272 self.all.append(self)
273
274class GTest(UnitTest):
275 '''Create a unit test based on the google test framework.'''
276
277 all = []
278 def __init__(self, *args, **kwargs):
279 super(GTest, self).__init__(*args, **kwargs)
280 self.dir = Dir('.')
278
279# Children should have access
280Export('Source')
281Export('PySource')
282Export('SimObject')
283Export('ProtoBuf')
284Export('UnitTest')
285Export('GTest')

--- 740 unchanged lines hidden (view full) ---

1026 new_env.Program(path, test_objs + static_objs)
1027
1028 gtest_env = new_env.Clone()
1029 gtest_env.Append(LIBS=gtest_env['GTEST_LIBS'])
1030 gtest_env.Append(CPPFLAGS=gtest_env['GTEST_CPPFLAGS'])
1031 for test in GTest.all:
1032 test_sources = Source.all.with_tag(str(test.target))
1033 test_objs = [ gtest_env.StaticObject(s.tnode) for s in test_sources ]
281
282# Children should have access
283Export('Source')
284Export('PySource')
285Export('SimObject')
286Export('ProtoBuf')
287Export('UnitTest')
288Export('GTest')

--- 740 unchanged lines hidden (view full) ---

1029 new_env.Program(path, test_objs + static_objs)
1030
1031 gtest_env = new_env.Clone()
1032 gtest_env.Append(LIBS=gtest_env['GTEST_LIBS'])
1033 gtest_env.Append(CPPFLAGS=gtest_env['GTEST_CPPFLAGS'])
1034 for test in GTest.all:
1035 test_sources = Source.all.with_tag(str(test.target))
1036 test_objs = [ gtest_env.StaticObject(s.tnode) for s in test_sources ]
1034 gtest_env.Program('unittest/%s.%s' % (test.target, label), test_objs)
1037 gtest_env.Program(test.dir.File('%s.%s' % (test.target, label)),
1038 test_objs)
1035
1036 progname = exename
1037 if strip:
1038 progname += '.unstripped'
1039
1040 targets = new_env.Program(progname, main_objs + static_objs)
1041
1042 if strip:

--- 119 unchanged lines hidden ---
1039
1040 progname = exename
1041 if strip:
1042 progname += '.unstripped'
1043
1044 targets = new_env.Program(progname, main_objs + static_objs)
1045
1046 if strip:

--- 119 unchanged lines hidden ---