SConscript (12387:bfea9ce684fb) | SConscript (12388:1e3ac63521ab) |
---|---|
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 --- 1076 unchanged lines hidden (view full) --- 1085 test_objs += main_objs 1086 path = 'unittest/%s.%s' % (test.target, label) 1087 new_env.Program(path, test_objs + static_objs) 1088 1089 gtest_env = new_env.Clone() 1090 gtest_env.Append(LIBS=gtest_env['GTEST_LIBS']) 1091 gtest_env.Append(CPPFLAGS=gtest_env['GTEST_CPPFLAGS']) 1092 gtestlib_sources = Source.all.with_tag('gtest lib') | 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 --- 1076 unchanged lines hidden (view full) --- 1085 test_objs += main_objs 1086 path = 'unittest/%s.%s' % (test.target, label) 1087 new_env.Program(path, test_objs + static_objs) 1088 1089 gtest_env = new_env.Clone() 1090 gtest_env.Append(LIBS=gtest_env['GTEST_LIBS']) 1091 gtest_env.Append(CPPFLAGS=gtest_env['GTEST_CPPFLAGS']) 1092 gtestlib_sources = Source.all.with_tag('gtest lib') |
1093 gtests = [] | 1093 gtest_out_dir = Dir(new_env['BUILDDIR']).Dir('unittests.%s' % label) |
1094 for test in GTest.all: 1095 test_sources = test.sources 1096 if not test.skip_lib: 1097 test_sources += gtestlib_sources 1098 for f in test.filters: 1099 test_sources += Source.all.apply_filter(f) 1100 test_objs = [ s.static(gtest_env) for s in test_sources ] | 1094 for test in GTest.all: 1095 test_sources = test.sources 1096 if not test.skip_lib: 1097 test_sources += gtestlib_sources 1098 for f in test.filters: 1099 test_sources += Source.all.apply_filter(f) 1100 test_objs = [ s.static(gtest_env) for s in test_sources ] |
1101 gtests.append(gtest_env.Program( 1102 test.dir.File('%s.%s' % (test.target, label)), test_objs)) | 1101 test_binary = gtest_env.Program( 1102 test.dir.File('%s.%s' % (test.target, label)), test_objs) |
1103 | 1103 |
1104 gtest_target = Dir(new_env['BUILDDIR']).File('unittests.%s' % label) 1105 AlwaysBuild(gtest_env.Command(gtest_target, gtests, gtests)) | 1104 AlwaysBuild(gtest_env.Command( 1105 gtest_out_dir.File("%s/%s.xml" % (test.dir, test.target)), 1106 test_binary, "${SOURCES[0]} --gtest_output=xml:${TARGETS[0]}")) |
1106 1107 progname = exename 1108 if strip: 1109 progname += '.unstripped' 1110 1111 targets = new_env.Program(progname, main_objs + static_objs) 1112 1113 if strip: --- 119 unchanged lines hidden --- | 1107 1108 progname = exename 1109 if strip: 1110 progname += '.unstripped' 1111 1112 targets = new_env.Program(progname, main_objs + static_objs) 1113 1114 if strip: --- 119 unchanged lines hidden --- |