unittests: Build copied BAppTest files

This adds to the "unittests" target a dependency on the
"AppTestRunApp3a" (etc.) files meant to be copied as part of the
BApplication test suite so they are generated when "jam unittests" is
run.

* TestsRules: Add "UnitTestDependency" rule.
* testapps/Jamfile: Make unit tests depend on copied files.

Fixes #12441.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
Simon South 2015-11-01 04:26:22 -05:00 committed by Adrien Destugues
parent 8d314f692b
commit 6abbd31061
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,12 @@
# unit test pseudo target
NotFile unittests ;
rule UnitTestDependency
{
Depends unittests : $(1) ;
}
rule UnitTestLib
{
# UnitTestLib <lib> : <sources> : <libraries> ;
@ -30,7 +36,7 @@ rule UnitTestLib
MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ;
SharedLibrary $(lib) : $(sources) : $(libraries) libcppunit.so ;
Depends unittests : $(lib) ;
UnitTestDependency $(lib) ;
}
@ -60,7 +66,7 @@ rule UnitTest
SimpleTest $(target) : $(sources) : $(libraries) libcppunit.so
: $(resources) ;
Depends unittests : $(target) ;
UnitTestDependency $(target) ;
}

View File

@ -42,6 +42,8 @@ rule CopyBAppTestApp
File $(target) : $(source) ;
MODE on $(target) = $(EXEMODE) ;
MimeSet $(target) ;
UnitTestDependency $(target) ;
}
# BApplication::BApplication() test apps