1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
|
# Boost serialization Library test Jamfile
# (C) Copyright Robert Ramey 2002-2004.
# Use, modification, and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# See http://www.boost.org/libs/test for the library home page.
subproject libs/serialization/test ;
# bring in rules for testing
import testing.jam ;
# Make tests run by default.
DEPENDS all : test ;
# these are used to shorten testing while in development. It permits
# testing to be applied to just a particular type of archive
if ! $(BOOST_ARCHIVE_LIST) {
BOOST_ARCHIVE_LIST =
"text_archive.hpp"
"text_warchive.hpp"
"binary_archive.hpp"
"xml_archive.hpp"
"xml_warchive.hpp"
;
# enable the tests which don't depend on a particular archive
BOOST_SERIALIZATION_TEST = true ;
}
# look in BOOST_ROOT for sources first, just in this Jamfile
local SEARCH_SOURCE = $(BOOST_ROOT) $(SEARCH_SOURCE) ;
# turns out we don't need this but leave it here in case we do
local test-dir = "$(BOOST_ROOT)$(SLASH)libs$(SLASH)serialization$(SLASH)test$(SLASH)tmp$(SLASH)" ;
# each of the following tests is run with each type of archive
rule run-invoke ( test-name : sources * : defn * )
{
Echo $(test-name) ;
# debug
local tests = [
run
$(sources)
<lib>../../test/build/boost_test_exec_monitor
<lib>../../serialization/build/boost_serialization
: # args
: # input files
: # requirements
std::locale-support
# <threading>single
# <runtime-link>static
<stlport-iostream>on
<borland><*><cxxflags>"-w-8080 -w-8071 -w-8057"
<borland-5_5_1><*><cxxflags>"-w-8080 -w-8071 -w-8057"
<borland-5_6_4><*><cxxflags>"-w-8080 -w-8071 -w-8057"
<define>$(defn)
<include>$(BOOST_ROOT)
: # name
$(test-name)
: # default-build
debug
] ;
if [ MATCH (.*load.*.run) : $(tests) ] {
DEPENDS $(tests) : [ SUBST $(tests) (.*)(load)(.*) $1save$3 ] ;
ECHO DEPENDS $(tests) ":" [ SUBST $(tests) (.*)(load)(.*) $1save$3 ] ;
}
# release mode tests are only run if this environment variable is set
# "_release" is appended to the name of the test if its a realease mode
# test. This permits them to appear in the same table built by
# compiler_status
if $(BOOST_SERIALIZATION_TEST_RELEASE) {
local releasetest = [
run
$(sources)
<lib>../../test/build/boost_test_exec_monitor
<lib>../../serialization/build/boost_serialization
: # args
: # input files
: # requirements
std::locale-support
# <threading>single
# <runtime-link>static
<stlport-iostream>on
<borland><*><cxxflags>"-w-8080 -w-8071 -w-8057"
<borland-5_5_1><*><cxxflags>"-w-8080 -w-8071 -w-8057"
<borland-5_6_4><*><cxxflags>"-w-8080 -w-8071 -w-8057"
<define>$(defn)
<include>$(BOOST_ROOT)
: # name
$(test-name)_release
: # default-build
release
] ;
if [ MATCH (.*load.*.run) : $(releasetest) ] {
DEPENDS $(releasetest) : [ SUBST $(releasetest) (.*)(load)(.*) $1save$3 ] ;
}
tests += releasetest ;
}
return ;
}
rule test-bsl-run ( test-name : sources * )
{
local tests ;
tests += [
run-invoke $(test-name)
:
$(test-name).cpp $(sources).cpp
<lib>../../serialization/build/boost_serialization
] ;
return $(tests) ;
}
rule test-bsl-run_archive ( test-name : archive-name : sources * ) {
local tests ;
switch $(archive-name) {
case "*_warchive" :
tests += [
run-invoke $(test-name)_$(archive-name)
:
$(sources).cpp
<lib>../../serialization/build/boost_serialization
<lib>../../serialization/build/boost_wserialization
:
BOOST_ARCHIVE_TEST=$(archive-name).hpp
] ;
case "*" :
tests += [
run-invoke $(test-name)_$(archive-name)
:
$(sources).cpp
<lib>../../serialization/build/boost_serialization
:
BOOST_ARCHIVE_TEST=$(archive-name).hpp
] ;
}
return $(tests) ;
}
rule test-bsl-run_polymorphic_archive ( test-name : sources * ) {
local tests ;
for local defn in $(BOOST_ARCHIVE_LIST) {
tests += [
test-bsl-run_archive test
: polymorphic_$(defn:LB)
: $(test-name) $(sources)
] ;
}
return $(tests) ;
}
rule test-bsl-run_files ( test-name : sources * ) {
local tests ;
for local defn in $(BOOST_ARCHIVE_LIST) {
tests += [
test-bsl-run_archive $(test-name) : $(defn:LB) : $(test-name) $(sources)
] ;
}
return $(tests) ;
}
test-suite "serialization" :
[ test-bsl-run_files test_array ]
[ test-bsl-run_files test_binary ]
[ test-bsl-run_files test_contained_class ]
[ test-bsl-run_files test_cyclic_ptrs ]
[ test-bsl-run_files test_delete_pointer ]
[ test-bsl-run_files test_deque ]
[ test-bsl-run_files test_derived ]
[ test-bsl-run_files test_derived_class ]
[ test-bsl-run_files test_derived_class_ptr ]
[ test-bsl-run_files test_diamond ]
[ test-bsl-run_files test_exported ]
[ test-bsl-run_files test_class_info_save ]
[ test-bsl-run_files test_class_info_load ]
[ test-bsl-run_files test_object ]
[ test-bsl-run_files test_primitive ]
[ test-bsl-run_files test_list ]
[ test-bsl-run_files test_list_ptrs ]
[ test-bsl-run_files test_map ]
[ test-bsl-run_files test_mi ]
[ test-bsl-run_files test_multiple_ptrs ]
[ test-bsl-run_files test_no_rtti ]
[ test-bsl-run_files test_non_intrusive ]
[ test-bsl-run_files test_non_default_ctor ]
[ test-bsl-run_files test_non_default_ctor2 ]
[ test-bsl-run_files test_null_ptr ]
[ test-bsl-run_files test_nvp ]
[ test-bsl-run_files test_recursion ]
[ test-bsl-run_files test_registered ]
[ test-bsl-run_files test_set ]
[ test-bsl-run_files test_simple_class ]
[ test-bsl-run_files test_simple_class_ptr ]
[ test-bsl-run_files test_split ]
[ test-bsl-run_files test_tracking ]
[ test-bsl-run_files test_unregistered ]
[ test-bsl-run_files test_vector ]
[ test-bsl-run_files test_optional ]
[ test-bsl-run_files test_shared_ptr ]
[ test-bsl-run_polymorphic_archive test_polymorphic : test_polymorphic_A ]
;
# This last DEPENDS makes the directory for the part 2 depend on the
# completion of part 1. You may ask why the directory and not the test
# itself? Strangely it's because to properly chain the tests you need to
# make the earliest step of the second test depend on the latest part of
# the next test. And directories are the only sure thing that you can know
# a test needs first.
if $(BOOST_SERIALIZATION_TEST) {
test-suite "serialization" :
[ test-bsl-run test_smart_cast ]
[ test-bsl-run test_iterators ]
[ test-bsl-run test_iterators_base64 ]
[ test-bsl-run test_static_warning ]
[ test-bsl-run test_void_cast ]
[ test-bsl-run test_traits_pass ]
[ test-bsl-run test_private_ctor ]
[ test-bsl-run test_mult_archive_types ]
[ run-invoke test_codecvt_null : test_codecvt_null.cpp ../src/codecvt_null.cpp ]
[ run-invoke test_utf8_codecvt : test_utf8_codecvt.cpp ../src/utf8_codecvt_facet.cpp ]
# demos
[ test-bsl-run test_demo ]
[ test-bsl-run test_demo_auto_ptr ]
[ test-bsl-run test_demo_exception ]
[ test-bsl-run test_demo_shared_ptr ]
[ test-bsl-run test_demo_xml ]
[ test-bsl-run test_demo_xml_load ]
[ test-bsl-run test_demo_xml_save ]
[ test-bsl-run test_demo_portable_archive ]
[ test-bsl-run test_demo_fast_archive ]
[ test-bsl-run test_demo_pimpl : ../example/demo_pimpl_A ]
[ test-bsl-run test_demo_polymorphic : ../example/demo_polymorphic_A ]
# should fail compilation
[ compile-fail test_traits_fail.cpp ]
[ compile-fail test_not_serializable.cpp ]
# should compile
[ compile test_const.cpp : std::locale-support ]
;
}
|