mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Revive all the tests.
* boost_build_v2.html: Document new option. * new/generators.jam (find-viable-generators): Revert part of Dave's commit, essentially disabling finding base type generators. This part breaks a test, and need to be thinked about. * new/errors.jam: Handle "--no-error-backtrace" option. * test/project_test4.py: Adjust for new error syntax. [SVN r16233]
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
</style>
|
||||
</head>
|
||||
<!-- Things yet to document:
|
||||
- build request, build request expansion and directly requested targets
|
||||
- conditional properties
|
||||
-->
|
||||
- build request, build request expansion and directly requested targets
|
||||
- conditional properties
|
||||
-->
|
||||
|
||||
<body>
|
||||
<p><a href="../../index.htm"><img class="banner" height="86" width="277"
|
||||
@@ -683,6 +683,13 @@ borland/runtime-link=static,dynamic
|
||||
|
||||
<td>Cause the project structure to be output.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>--no-error-backtrace</tt></td>
|
||||
|
||||
<td>Don't print backtrace on errors. Primary usefull for
|
||||
testing.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -102,10 +102,38 @@ rule error-skip-frames ( skip-frames messages * : * )
|
||||
}
|
||||
}
|
||||
|
||||
if --no-error-backtrace in [ modules.peek : ARGV ]
|
||||
{
|
||||
.no-error-backtrace = true ;
|
||||
}
|
||||
|
||||
|
||||
# Print an error message with a stack backtrace and exit.
|
||||
rule error ( messages * : * )
|
||||
{
|
||||
error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
if $(.no-error-backtrace)
|
||||
{
|
||||
# Print each argument on a separate line.
|
||||
for local n in $(.args)
|
||||
{
|
||||
if $($(n))-is-not-empty
|
||||
{
|
||||
if ! $(first-printed)
|
||||
{
|
||||
ECHO error: $($(n)) ;
|
||||
first-printed = true ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ECHO $($(n)) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
}
|
||||
}
|
||||
|
||||
# Print a warning message with a stack backtrace and exit.
|
||||
|
||||
@@ -90,7 +90,7 @@ rule normalize-target-list ( targets )
|
||||
# Creates a generator
|
||||
rule generator (
|
||||
id # identifies the generator - should be name of the rule which
|
||||
# sets up build actions
|
||||
# sets up build actions
|
||||
|
||||
: source-types + # types that this generator can handle
|
||||
|
||||
@@ -565,7 +565,9 @@ local rule find-viable-generators ( target-type : properties * )
|
||||
local generator-rank = ;
|
||||
|
||||
import type ;
|
||||
local t = [ type.all-bases $(target-type) ] ;
|
||||
#VP: the following breaks the NM transformation test.
|
||||
#local t = [ type.all-bases $(target-type) ] ;
|
||||
local t = $(target-type) ;
|
||||
|
||||
while $(t[1])
|
||||
{
|
||||
|
||||
@@ -6,4 +6,4 @@ exe f : a.cpp b.cxx obj_1 obj_2 lib/auxilliary ;
|
||||
obj obj_1 : z.cpp : <define>SELECT=1 ;
|
||||
obj obj_2 : z.cpp : <define>SELECT=2 ;
|
||||
|
||||
nm_exe e : e.cpp ;
|
||||
nm-exe e : e.cpp ;
|
||||
|
||||
@@ -4,10 +4,10 @@ import generators ;
|
||||
|
||||
type.register WHL : whl ;
|
||||
type.register DLP : dlp ;
|
||||
type.register WHL-LR0 : lr0 ;
|
||||
type.register WHL_LR0 : lr0 ;
|
||||
type.register WD : wd ;
|
||||
|
||||
generators.register-standard extra.whale : WHL : CPP WHL-LR0 ;
|
||||
generators.register-standard extra.whale : WHL : CPP WHL_LR0 ;
|
||||
generators.register-standard extra.dolphin : DLP : CPP ;
|
||||
generators.register-standard extra.wd : WD : WHL(%_parser) DLP(%_lexer) ;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import extra ;
|
||||
import type ;
|
||||
|
||||
type.register UI : ui ;
|
||||
type.register UIC-H : h ;
|
||||
type.register UIC_H : h ;
|
||||
|
||||
type.register X1 : x1 ;
|
||||
type.register X2 : x2 ;
|
||||
@@ -17,8 +17,8 @@ type.register X_PRO : x_pro ;
|
||||
|
||||
import generators ;
|
||||
|
||||
generators.register-standard qt.uic : UI UIC-H : CPP ;
|
||||
generators.register-standard qt.uic-h : UI : UIC-H ;
|
||||
generators.register-standard qt.uic : UI UIC_H : CPP ;
|
||||
generators.register-standard qt.uic-h : UI : UIC_H ;
|
||||
|
||||
# That's an interesting example. Currently, X_PRO will be processed
|
||||
# twice.
|
||||
@@ -33,15 +33,15 @@ generators.register-standard extra.x_pro : X_PRO : X1 X2 ;
|
||||
#if $(no-var) {
|
||||
import nm ;
|
||||
|
||||
type.register CPP-MARKED : marked.cpp : CPP ;
|
||||
type.register CPP_MARKED : marked.cpp : CPP ;
|
||||
type.register POSITIONS : positions ;
|
||||
type.register NM.TARGET.CPP : target.cpp : CPP ;
|
||||
type.register NM_EXE : : EXE : main ;
|
||||
|
||||
# Should inherit generators from base class?
|
||||
generators.register-composing gcc.link : OBJ : NM_EXE : <toolset>gcc ;
|
||||
generators.register-standard nm.target-source : CPP-MARKED : NM.TARGET.CPP ;
|
||||
generators.register-standard nm.cpp-mark : CPP : CPP-MARKED POSITIONS ;
|
||||
generators.register-standard nm.target-source : CPP_MARKED : NM.TARGET.CPP ;
|
||||
generators.register-standard nm.cpp-mark : CPP : CPP_MARKED POSITIONS ;
|
||||
|
||||
|
||||
rule nm.target.cpp-obj-generator
|
||||
|
||||
@@ -38,12 +38,10 @@ t.expect_content("bin/gcc/debug/main-target-b.exe/b.exe",
|
||||
|
||||
t.copy("lib/Jamfile2", "lib/Jamfile")
|
||||
|
||||
expected="""Requirements for project at 'lib' conflict with parent's.
|
||||
Explanation: link-incompatible properties <threading>single and
|
||||
<threading>multi
|
||||
|
||||
expected="""error: Requirements for project at 'lib' conflict with parent's.
|
||||
Explanation: link-incompatible properties <threading>single and <threading>multi
|
||||
"""
|
||||
t.run_build_system(stdout=expected, status=None)
|
||||
t.run_build_system("--no-error-backtrace", stdout=expected, status=None)
|
||||
|
||||
t.copy("lib/Jamfile3", "lib/Jamfile")
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
</style>
|
||||
</head>
|
||||
<!-- Things yet to document:
|
||||
- build request, build request expansion and directly requested targets
|
||||
- conditional properties
|
||||
-->
|
||||
- build request, build request expansion and directly requested targets
|
||||
- conditional properties
|
||||
-->
|
||||
|
||||
<body>
|
||||
<p><a href="../../index.htm"><img class="banner" height="86" width="277"
|
||||
@@ -683,6 +683,13 @@ borland/runtime-link=static,dynamic
|
||||
|
||||
<td>Cause the project structure to be output.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>--no-error-backtrace</tt></td>
|
||||
|
||||
<td>Don't print backtrace on errors. Primary usefull for
|
||||
testing.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ rule normalize-target-list ( targets )
|
||||
# Creates a generator
|
||||
rule generator (
|
||||
id # identifies the generator - should be name of the rule which
|
||||
# sets up build actions
|
||||
# sets up build actions
|
||||
|
||||
: source-types + # types that this generator can handle
|
||||
|
||||
@@ -565,7 +565,9 @@ local rule find-viable-generators ( target-type : properties * )
|
||||
local generator-rank = ;
|
||||
|
||||
import type ;
|
||||
local t = [ type.all-bases $(target-type) ] ;
|
||||
#VP: the following breaks the NM transformation test.
|
||||
#local t = [ type.all-bases $(target-type) ] ;
|
||||
local t = $(target-type) ;
|
||||
|
||||
while $(t[1])
|
||||
{
|
||||
|
||||
@@ -102,10 +102,38 @@ rule error-skip-frames ( skip-frames messages * : * )
|
||||
}
|
||||
}
|
||||
|
||||
if --no-error-backtrace in [ modules.peek : ARGV ]
|
||||
{
|
||||
.no-error-backtrace = true ;
|
||||
}
|
||||
|
||||
|
||||
# Print an error message with a stack backtrace and exit.
|
||||
rule error ( messages * : * )
|
||||
{
|
||||
error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
if $(.no-error-backtrace)
|
||||
{
|
||||
# Print each argument on a separate line.
|
||||
for local n in $(.args)
|
||||
{
|
||||
if $($(n))-is-not-empty
|
||||
{
|
||||
if ! $(first-printed)
|
||||
{
|
||||
ECHO error: $($(n)) ;
|
||||
first-printed = true ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ECHO $($(n)) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
}
|
||||
}
|
||||
|
||||
# Print a warning message with a stack backtrace and exit.
|
||||
|
||||
@@ -6,4 +6,4 @@ exe f : a.cpp b.cxx obj_1 obj_2 lib/auxilliary ;
|
||||
obj obj_1 : z.cpp : <define>SELECT=1 ;
|
||||
obj obj_2 : z.cpp : <define>SELECT=2 ;
|
||||
|
||||
nm_exe e : e.cpp ;
|
||||
nm-exe e : e.cpp ;
|
||||
|
||||
@@ -4,10 +4,10 @@ import generators ;
|
||||
|
||||
type.register WHL : whl ;
|
||||
type.register DLP : dlp ;
|
||||
type.register WHL-LR0 : lr0 ;
|
||||
type.register WHL_LR0 : lr0 ;
|
||||
type.register WD : wd ;
|
||||
|
||||
generators.register-standard extra.whale : WHL : CPP WHL-LR0 ;
|
||||
generators.register-standard extra.whale : WHL : CPP WHL_LR0 ;
|
||||
generators.register-standard extra.dolphin : DLP : CPP ;
|
||||
generators.register-standard extra.wd : WD : WHL(%_parser) DLP(%_lexer) ;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import extra ;
|
||||
import type ;
|
||||
|
||||
type.register UI : ui ;
|
||||
type.register UIC-H : h ;
|
||||
type.register UIC_H : h ;
|
||||
|
||||
type.register X1 : x1 ;
|
||||
type.register X2 : x2 ;
|
||||
@@ -17,8 +17,8 @@ type.register X_PRO : x_pro ;
|
||||
|
||||
import generators ;
|
||||
|
||||
generators.register-standard qt.uic : UI UIC-H : CPP ;
|
||||
generators.register-standard qt.uic-h : UI : UIC-H ;
|
||||
generators.register-standard qt.uic : UI UIC_H : CPP ;
|
||||
generators.register-standard qt.uic-h : UI : UIC_H ;
|
||||
|
||||
# That's an interesting example. Currently, X_PRO will be processed
|
||||
# twice.
|
||||
@@ -33,15 +33,15 @@ generators.register-standard extra.x_pro : X_PRO : X1 X2 ;
|
||||
#if $(no-var) {
|
||||
import nm ;
|
||||
|
||||
type.register CPP-MARKED : marked.cpp : CPP ;
|
||||
type.register CPP_MARKED : marked.cpp : CPP ;
|
||||
type.register POSITIONS : positions ;
|
||||
type.register NM.TARGET.CPP : target.cpp : CPP ;
|
||||
type.register NM_EXE : : EXE : main ;
|
||||
|
||||
# Should inherit generators from base class?
|
||||
generators.register-composing gcc.link : OBJ : NM_EXE : <toolset>gcc ;
|
||||
generators.register-standard nm.target-source : CPP-MARKED : NM.TARGET.CPP ;
|
||||
generators.register-standard nm.cpp-mark : CPP : CPP-MARKED POSITIONS ;
|
||||
generators.register-standard nm.target-source : CPP_MARKED : NM.TARGET.CPP ;
|
||||
generators.register-standard nm.cpp-mark : CPP : CPP_MARKED POSITIONS ;
|
||||
|
||||
|
||||
rule nm.target.cpp-obj-generator
|
||||
|
||||
@@ -38,12 +38,10 @@ t.expect_content("bin/gcc/debug/main-target-b.exe/b.exe",
|
||||
|
||||
t.copy("lib/Jamfile2", "lib/Jamfile")
|
||||
|
||||
expected="""Requirements for project at 'lib' conflict with parent's.
|
||||
Explanation: link-incompatible properties <threading>single and
|
||||
<threading>multi
|
||||
|
||||
expected="""error: Requirements for project at 'lib' conflict with parent's.
|
||||
Explanation: link-incompatible properties <threading>single and <threading>multi
|
||||
"""
|
||||
t.run_build_system(stdout=expected, status=None)
|
||||
t.run_build_system("--no-error-backtrace", stdout=expected, status=None)
|
||||
|
||||
t.copy("lib/Jamfile3", "lib/Jamfile")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user