Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75850 - in trunk/tools/build/v2/test: . v1-testing v1_testing
From: steven_at_[hidden]
Date: 2011-12-07 11:52:59


Author: steven_watanabe
Date: 2011-12-07 11:52:58 EST (Wed, 07 Dec 2011)
New Revision: 75850
URL: http://svn.boost.org/trac/boost/changeset/75850

Log:
Remove tests from Boost.Build V1.
Removed:
   trunk/tools/build/v2/test/Jamrules
   trunk/tools/build/v2/test/empty.jam
   trunk/tools/build/v2/test/startup_v1.py
   trunk/tools/build/v2/test/unit-tests.jam
   trunk/tools/build/v2/test/v1-testing/
   trunk/tools/build/v2/test/v1_testing/
   trunk/tools/build/v2/test/v1_testing.py
Text files modified:
   trunk/tools/build/v2/test/test_all.py | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Deleted: trunk/tools/build/v2/test/Jamrules
==============================================================================
--- trunk/tools/build/v2/test/Jamrules 2011-12-07 11:52:58 EST (Wed, 07 Dec 2011)
+++ (empty file)
@@ -1,4 +0,0 @@
-# This simple Jamrules file is used for the Boost.Build test project.
-
-# The testing framework itself gets no boost-Jambase
-BOOST_JAMBASE = empty.jam ;

Deleted: trunk/tools/build/v2/test/empty.jam
==============================================================================
--- trunk/tools/build/v2/test/empty.jam 2011-12-07 11:52:58 EST (Wed, 07 Dec 2011)
+++ (empty file)
@@ -1,5 +0,0 @@
-# Copyright 2001 Dave Abrahams
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-
-# This file is empty; it just suppresses warnings

Deleted: trunk/tools/build/v2/test/startup_v1.py
==============================================================================
--- trunk/tools/build/v2/test/startup_v1.py 2011-12-07 11:52:58 EST (Wed, 07 Dec 2011)
+++ (empty file)
@@ -1,81 +0,0 @@
-#!/usr/bin/python
-
-# Copyright 2002 Dave Abrahams
-# Copyright 2003, 2004, 2005 Vladimir Prus
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-
-import BoostBuild
-import os
-import re
-
-def expect_substring(actual, expected):
- return actual.find(expected) != -1
-
-def match_re(actual, expected):
- return re.match(expected, actual, re.DOTALL) != None
-
-# Test the v1 startup behavior.
-t = BoostBuild.Tester(executable='bjam', match=match_re, boost_build_path='',
- pass_toolset=0)
-
-t.set_tree('startup')
-
-#if os.name == 'nt':
-# t.run_build_system(
-# status=1, stdout="You didn't set BOOST_ROOT", match = expect_substring)
-
-t.run_build_system(extra_args='-sBOOST_ROOT=.', status=1,
- stdout=r'''Unable to load Boost\.Build: could not find ''' +
- r'''"boost-build\.jam".''')
-
-os.chdir('no-bootstrap1')
-
-t.run_build_system(extra_args='-sBOOST_ROOT=.', status=1,
- stdout=r'''Unable to load Boost\.Build: could not find build system\.'''
- + r'''.*attempted to load the build system by invoking'''
- + r'''.*'boost-build ;'.*'''
- + r'''but we were unable to find "bootstrap\.jam"''')
-
-# Descend to a subdirectory which /doesn't/ contain a boost-build.jam
-# file, and try again to test the crawl-up behavior.
-os.chdir('subdir')
-
-t.run_build_system(extra_args='-sBOOST_ROOT=.', status=1,
- stdout=r'''Unable to load Boost\.Build: could not find build system\.'''
- + r'''.*attempted to load the build system by invoking'''
- + r'''.*'boost-build ;'.*'''
- + r'''but we were unable to find "bootstrap\.jam"''')
-
-os.chdir('../../no-bootstrap2')
-
-t.run_build_system(extra_args='-sBOOST_ROOT=.', status=1,
- stdout=r'''Unable to load Boost\.Build: could not find build system\.'''
- + r'''.*attempted to load the build system by invoking'''
- + r'''.*'boost-build \. ;'.*'''
- + r'''but we were unable to find "bootstrap\.jam"''')
-
-os.chdir('../no-bootstrap3')
-
-t.run_build_system(extra_args='-sBOOST_ROOT=.', status=1,
- stdout=r'''Unable to load Boost.Build
-.*boost-build.jam" was found.*
-However, it failed to call the "boost-build" rule''')
-
-# test bootstrapping based on BOOST_BUILD_PATH
-os.chdir('../bootstrap-env')
-t.run_build_system(extra_args='-sBOOST_ROOT=../boost-root ' +
- '-sBOOST_BUILD_PATH=../boost-root/build',
- stdout='build system bootstrapped')
-
-# test bootstrapping based on an explicit path in boost-build.jam
-os.chdir('../bootstrap-explicit')
-t.run_build_system(extra_args='-sBOOST_ROOT=../boost-root',
- stdout='build system bootstrapped')
-
-# test bootstrapping based on BOOST_ROOT
-os.chdir('../bootstrap-implicit')
-t.run_build_system(extra_args='-sBOOST_ROOT=../boost-root',
- stdout='build system bootstrapped')
-
-t.cleanup()

Modified: trunk/tools/build/v2/test/test_all.py
==============================================================================
--- trunk/tools/build/v2/test/test_all.py (original)
+++ trunk/tools/build/v2/test/test_all.py 2011-12-07 11:52:58 EST (Wed, 07 Dec 2011)
@@ -118,7 +118,7 @@
         return tests
 
 
-critical_tests = ["unit_tests", "module_actions", "startup_v1", "startup_v2"]
+critical_tests = ["unit_tests", "module_actions", "startup_v2"]
 
 critical_tests += ["core_d12", "core_typecheck", "core_delete_module",
                    "core_language", "core_arguments", "core_varnames", "core_import_module"]

Deleted: trunk/tools/build/v2/test/unit-tests.jam
==============================================================================
--- trunk/tools/build/v2/test/unit-tests.jam 2011-12-07 11:52:58 EST (Wed, 07 Dec 2011)
+++ (empty file)
@@ -1,262 +0,0 @@
-# Copyright 2001 Dave Abrahams
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-
-# assert_equal a : b
-#
-# exits with an assertion failure if a != b
-rule assert_equal
-{
- if $(<) != $(>)
- {
- EXIT "assertion failure: [" $(<) "] != [" $(>) "]" ;
- }
-}
-
-rule assert_equal_sets
-{
- if ! [ equal-sets $(<) : $(>) ]
- {
- EXIT "assertion failure: [" $(<) "] !=(set) [" $(>) "]" ;
- }
-}
-
-# FAppendSuffix
-assert_equal [ FAppendSuffix yacc lex foo.bat : ] : yacc lex foo.bat ;
-assert_equal [ FAppendSuffix yacc lex foo.bat : .exe ] : yacc.exe lex.exe foo.bat ;
-assert_equal [ FAppendSuffix yacc lex foo.bat : .dll .lib ] : yacc.dll yacc.lib lex.dll lex.lib foo.bat foo.lib ;
-
-# sort
-assert_equal [ sort 7 3 5 6 2 4 ] : 2 3 4 5 6 7 ;
-
-# min
-assert_equal [ min 7 3 5 6 2 4 ] : 2 ;
-
-# difference
-assert_equal [ difference 0 1 2 3 4 5 6 7 8 9 : 2 3 5 7 ] : 0 1 4 6 8 9 ;
-
-# replace
-assert_equal [ replace 1 3 5 7 7 9 2 5 4 3 1 : 7 x ] : 1 3 5 x x 9 2 5 4 3 1 ;
-
-# select-ungristed
-assert_equal [ select-ungristed <a>b c <d>e f ] : c f ;
-
-# split-qualified-property
-assert_equal [ split-qualified-property <feature>value ]
- : <*> <*> <feature>value ;
-
-assert_equal [ split-qualified-property <variant><feature>value ]
- : <*> <variant> <feature>value ;
-
-assert_equal [ split-qualified-property <toolset><variant><feature>value ]
- : <toolset> <variant> <feature>value ;
-
-# unique
-assert_equal [ unique 0 1 2 3 1 7 6 6 4 5 ] : 0 1 2 3 7 6 4 5 ;
-
-# get-properties
-assert_equal [ get-properties <foo> <bar> : <foo>bar <foo>baz <bar>fight <baz>niss ]
- : <foo>bar <foo>baz <bar>fight ;
-
-# get-values
-assert_equal [ get-values <foo> : <foo>bar <foo>baz <bar>fight <baz>niss ] : bar baz ;
-
-# normalize-properties
-assert_equal [ normalize-properties <a>b <c><d>e <f><g><h>i ] :
- <*><*><a>b <*><c><d>e <f><g><h>i ;
-
-# intersection
-assert_equal [ intersection 1 2 2 3 3 4 5 6 7 : 5 1 3 7 3 9 11 ] : 1 3 3 5 7 ;
-
-# is-subset
-assert_equal [ is-subset a b c : c a b d ] : true ;
-assert_equal [ is-subset a b z : c a b d ] : ;
-
-# split-path
-assert_equal [ split-path <a>b/c/<d>e ] : <a>b c <d>e ;
-assert_equal [ split-path <a>/<d>/<e> ] : <a> <d> <e> ;
-assert_equal [ split-path <a> ] : <a> ;
-assert_equal [ split-path x ] : x ;
-assert_equal [ split-path $(DOT) ] : $(DOT) ;
-assert_equal [ split-path a/b.c/d.e/f ] : a b.c d.e f ;
-if $(NT)
-{
- assert_equal [ split-path x:\\y\\z\\w ] : x: y z w ;
- assert_equal [ split-path x:\\y\\z ] : x: y z ;
- assert_equal [ split-path x:\\y ] : x: y ;
- assert_equal [ split-path x:\\ ] : x: ;
- assert_equal [ split-path x: ] : x: ;
-}
-
-# distribute-feature
-assert_equal [ distribute-feature <feature>value1 ] : <feature>value1 ;
-assert_equal [ distribute-feature <feature>value1/value2 ] : <feature>value1 <feature>value2 ;
-assert_equal [ distribute-feature <feature>value1/value2/value3 ] : <feature>value1 <feature>value2 <feature>value3 ;
-
-# segregate-free-properties
-{
- local gFREE_FEATURES = <a> <c> <e> ;
- local x = <a>b <b>c <d>e ;
- local y = <a>b <a>c <b>c <e>f ;
- local free = [ segregate-free-properties x y ] ;
- assert_equal $(free) : <a>b <a>c <e>f ;
- assert_equal $(x) : <b>c <d>e ;
- assert_equal $(y) : <b>c ;
-}
-
-# set-insert
-{
- local gTEST_SET = 1 2 3 ;
- set-insert gTEST_SET : 2 ;
- assert_equal $(gTEST_SET) : 1 2 3 ;
- set-insert gTEST_SET : 0 ;
- assert_equal $(gTEST_SET) : 1 2 3 0 ;
-}
-
-# equal-sets
-assert_equal [ equal-sets 1 2 3 : 3 2 2 1 ] : true ;
-assert_equal [ equal-sets 1 2 3 3 : 3 2 2 1 ] : true ;
-assert_equal [ equal-sets 1 2 3 3 4 : 3 2 2 1 ] : ;
-
-# segregate-overrides
-{
- local base = <a>b <c>d <e>f ;
- local overrides = <a>b <c>c <d>e <f>g ;
- segregate-overrides overrides : base ;
- assert_equal $(overrides) : <c>c <d>e <f>g ;
- assert_equal $(base) : <a>b <e>f ;
-}
-
-# select-properties
-{
- local TOOLS = gcc msvc ;
-
- local gRELEVANT_FEATURES(msvc) = <debug-symbols> <optimization> <inlining> <inline> <runtime-build> <runtime-link> <threading> <define> <undef> <include> <target-type> ;
- local gRELEVANT_FEATURES(gcc) = <runtime-link> <debug-symbols> <optimization> <inlining> <profiling> <define> <undef> <include> <shared-linkable> <target-type> ;
- local gFREE_FEATURES = <define> <undef> <include> ;
-
- local gBASE_PROPERTIES(msvc,debug) = <debug-symbols>on <inlining>off <optimization>off <runtime-build>debug <threading>single ;
- local gBASE_PROPERTIES(gcc,debug) = <debug-symbols>on <inlining>off <optimization>off <profiling>off <shared-linkable>false ;
- local gBASE_PROPERTIES(msvc,release) = <debug-symbols>off <define>NDEBUG <inlining>full <optimization>speed <runtime-build>release <threading>single ;
- local gBASE_PROPERTIES(gcc,release) = <debug-symbols>off <define>NDEBUG <inlining>full <optimization>speed <profiling>off <shared-linkable>false ;
-
- local TEST_PROPERTIES = <inlining>off <define>FOO <*><release><inlining>on
- <debug><define>DEBUG <msvc><release><foo>bar
- <gcc><*><inlining>on
- <msvc><*><foo>baz
- <msvc><release><optimization>speed
- <msvc><*><optimization>off
- <*><debug><optimization>off
- ;
-
- assert_equal_sets [ select-properties gcc debug my-target : $(TEST_PROPERTIES) ]
- : <define>FOO <define>DEBUG <inlining>on <optimization>off ;
-
- assert_equal_sets [ select-properties gcc release my-target : $(TEST_PROPERTIES) ]
- : <define>FOO <inlining>on ;
-
- assert_equal_sets [ select-properties msvc debug my-target : $(TEST_PROPERTIES) ]
- : <define>FOO <define>DEBUG <inlining>off <optimization>off ;
-
- assert_equal_sets [ select-properties msvc release my-target : $(TEST_PROPERTIES) ]
- : <define>FOO <inlining>on <optimization>speed ;
-}
-
-
-# ungrist-properties
-feature TEST_FEATURE1 : a b ;
-feature TEST_FEATURE2 : c d ;
-assert_equal [ ungrist-properties <TEST_FEATURE1>a <TEST_FEATURE2>c ]
- : TEST_FEATURE1-a TEST_FEATURE2-c ;
-
-
-# fixup-path-properties
-{
- local RELATIVE_SUBDIR = foobar ;
- local gPATH_FEATURES = <include> ;
- assert_equal [ fixup-path-properties <a>b <include>.. <c>d ]
- : <include>foobar$(SLASH).. <a>b <c>d ;
-}
-# multiply-property-sets
-assert_equal [ multiply-property-sets <b>1 <a>2/3 <c>4/5 ]
- : <a>2/<b>1/<c>4 <a>2/<b>1/<c>5 <a>3/<b>1/<c>4 <a>3/<b>1/<c>5 ;
-
-# make-path-property-sets
-{
- local gUNGRISTED(<a>) = a ;
- local gUNGRISTED(<c>) = c ;
- local gUNGRISTED(<e>) = e ;
- local gUNGRISTED(<g>) = g ;
- local gUNGRISTED(<i>) = i ;
- assert_equal [ make-path-property-sets foo$(SLASH)bar : <a>b <c>d : <e>f$(SLASH)<g>h <i>j ]
- : foo$(SLASH)bar$(SLASH)e-f$(SLASH)g-h$(SLASH)<a>b$(SLASH)<c>d$(SLASH)<e>f$(SLASH)<g>h foo$(SLASH)bar$(SLASH)i-j$(SLASH)<a>b$(SLASH)<c>d$(SLASH)<i>j ;
- assert_equal [ make-path-property-sets foo$(SLASH)bar : <a>b <c>d : ]
- : foo$(SLASH)bar$(SLASH)<a>b$(SLASH)<c>d ;
-}
-
-
-# split-path-at-grist
-assert_equal
- [ split-path-at-grist <a>b$(SLASH)c$(SLASH)<d>e$(SLASH)<f>g$(SLASH)h$(SLASH)i ]
- : <a>b$(SLASH)c <d>e <f>g$(SLASH)h$(SLASH)i ;
-assert_equal
- [ split-path-at-grist b$(SLASH)c$(SLASH)<d>e$(SLASH)<f>g$(SLASH)h$(SLASH)i ]
- : b$(SLASH)c <d>e <f>g$(SLASH)h$(SLASH)i ;
-if $(NT)
-{
- assert_equal
- [ split-path-at-grist b\\c\\<include>e:\\f\\g\\<h>i ]
- : b\\c <include>e:\\f\\g <h>i ;
-}
-# directory-of
-assert_equal [ directory-of a$(SLASH)b c d$(SLASH)e$(SLASH)f ] : a . d$(SLASH)e ;
-
-# top-relative-tokens
-{
- local SUBDIR_TOKENS = a b c ;
- assert_equal [ top-relative-tokens ..$(SLASH)d$(SLASH)e ] : a b d e ;
-}
-
-# flags
-{
- local gBUILD_PROPERTIES = <a>b <c>d <e>f ;
- local FLAGS1 FLAGS2 FLAGS3 ;
- flags toolset FLAGS1 <a>b/<c>d <a>b/<e>f <x>y <a>/<c> <e> : foobar ;
- assert_equal $(FLAGS1) : foobar b d f ;
- flags toolset FLAGS2 <a> : foobar ;
- assert_equal $(FLAGS2) : b ;
- flags toolset FLAGS1 <a>b/<c>d <a>b/<e>f : foobar ;
- assert_equal $(FLAGS1) : foobar b d f foobar ;
-}
-
-# get-BUILD
-{
- local DEFAULT_BUILD = a ;
- local BUILD = b ;
- assert_equal [ get-BUILD c <d>e ] : b ;
- BUILD = ;
- assert_equal [ get-BUILD c <d>e ] : c <d>e ;
- assert_equal [ get-BUILD ] : a ;
- assert_equal [ get-BUILD <d>e ] : <d>e a ;
- BUILD = <f>g ;
- assert_equal [ get-BUILD c <d>e ] : <f>g a ;
-}
-
-# strip-initial
-assert_equal [ strip-initial a b c : a b c d e f g ] : d e f g ;
-assert_equal [ strip-initial a b c : a b d e f g ] : a b d e f g ;
-assert_equal [ strip-initial a b c : b d e f g ] : b d e f g ;
-assert_equal [ strip-initial a b c : ] : ;
-
-# simplify-path-tokens
-{
- local $(gTOP)_TOKENS = .. .. .. ;
- local gINVOCATION_SUBDIR_TOKENS = d e ;
- assert_equal [ simplify-path-tokens a b . c .. .. d e ] : a d e ;
- assert_equal [ simplify-path-tokens a b .. .. .. d e ] : .. d e ;
- assert_equal [ simplify-path-tokens .. .. d e : xxx ] : .. .. d e ;
- assert_equal [ simplify-path-tokens a b .. .. : xxx ] : xxx ;
- $(gTOP)_TOKENS = .. .. ;
- assert_equal [ simplify-path-tokens .. .. d e : xxx ] : xxx ;
- assert_equal [ simplify-path-tokens .. .. d e f g : xxx ] : f g ;
-}

Deleted: trunk/tools/build/v2/test/v1_testing.py
==============================================================================
--- trunk/tools/build/v2/test/v1_testing.py 2011-12-07 11:52:58 EST (Wed, 07 Dec 2011)
+++ (empty file)
@@ -1,88 +0,0 @@
-#!/usr/bin/python
-
-# Copyright 2002 Dave Abrahams
-# Copyright 2004 Vladimir Prus
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-
-import BoostBuild
-import os
-from string import strip
-import re
-import time
-
-def match_re(actual,expected):
- return re.match(expected,actual,re.DOTALL) != None
-
-t = BoostBuild.Tester(match = match_re, boost_build_path = os.path.join(os.getcwd(), ".."))
-t.set_tree('v1_testing')
-
-os.environ['TOOLS'] = 'gcc'
-os.environ['NOARSCAN'] = '1'
-
-# 1) No existing bin directories. Both build and test ran fine. As
-# expected, the residue files were a bit different: There was no
-# path_test.success, and path_test.test contained the word "passed"
-# instead of the path to the .cpp file. I've haven't looked yet to
-# see if the lack of the path is a problem for reporting, but
-# hopefully the information is trivially available somewhere else.
-t.run_build_system(arguments = 'test', status = 0)
-t.expect_addition(
- ['bin/compile.test/gcc/debug/runtime-link-dynamic/compile.test'
- , 'bin/nocompile.test/gcc/debug/runtime-link-dynamic/nocompile.test'
- , 'bin/link.test/gcc/debug/runtime-link-dynamic/link.test'
- , 'bin/nolink.test/gcc/debug/runtime-link-dynamic/nolink.test'
- , 'bin/run.test/gcc/debug/runtime-link-dynamic/run.test'])
-
-
-# 2) Missing source file for the library build. path_test.test was
-# deleted, so the reporting programs would know that failure
-# occurred. The stdout messages also indicated what had
-# happened. Excellent!
-t.rename('lib.cpp', 'lib.cpp.bak')
-t.run_build_system(arguments = 'test', status = 1)
-t.expect_removal(
- ['bin/link.test/gcc/debug/runtime-link-dynamic/link.test'
- , 'bin/nolink.test/gcc/debug/runtime-link-dynamic/nolink.test'
- , 'bin/run.test/gcc/debug/runtime-link-dynamic/run.test'])
-
-# 3) Missing file restored. Worked fine; path_test.test was recreated,
-# no other files were touched.
-t.rename('lib.cpp.bak', 'lib.cpp')
-t.run_build_system(arguments = 'test', status = 0)
-t.expect_addition(
- [ 'bin/link.test/gcc/debug/runtime-link-dynamic/link.test'
- , 'bin/nolink.test/gcc/debug/runtime-link-dynamic/nolink.test'
- , 'bin/run.test/gcc/debug/runtime-link-dynamic/run.test'])
- # I didn't add a test for 'no other files were touched', because
- # it's a little complicated. There is an expect_nothing_more()
- # function, but we actually need to spell out a lot more than
- # what we currently have to do that.
-
-# 4) Introduced error into one of the library files, causing a library build
-# compile to fail. path_test.test was deleted, so the reporting programs
-# would know that failure occurred. Excellent! This is the case that has
-# caused regression testing to report the wrong results in the past, so it
-# was good news to see it working correctly now. We probably should figure
-# out some other test cases just to be sure it is working for full coverage.
-t.rename('lib.cpp', 'lib.cpp.bak')
-t.rename('lib-err.cpp', 'lib.cpp')
-t.touch('lib.cpp')
-t.run_build_system(arguments = 'test', status=1)
-t.expect_removal(
- ['bin/link.test/gcc/debug/runtime-link-dynamic/link.test'
- , 'bin/nolink.test/gcc/debug/runtime-link-dynamic/nolink.test'
- , 'bin/run.test/gcc/debug/runtime-link-dynamic/run.test'])
-
-# 5) Fixed the error in the library file. The library build then worked, and
-# path_test.exe was relinked, without first recompiling path_test.obj. Test was
-# rerun. Exactly the right behavior!
-t.rename('lib.cpp.bak', 'lib.cpp')
-t.run_build_system(arguments = 'test', status = 0)
-t.expect_addition(
- [ 'bin/link.test/gcc/debug/runtime-link-dynamic/link.test'
- , 'bin/nolink.test/gcc/debug/runtime-link-dynamic/nolink.test'
- , 'bin/run.test/gcc/debug/runtime-link-dynamic/run.test'])
-
-t.cleanup()
-print 'testing complete'


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk