Skip to content

Commit

Permalink
unittests: Build copied BAppTest files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon South authored and pulkomandy committed Nov 1, 2015
1 parent 8d314f6 commit 6abbd31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build/jam/TestsRules
@@ -1,6 +1,12 @@
# unit test pseudo target
NotFile unittests ;

rule UnitTestDependency
{
Depends unittests : $(1) ;
}


rule UnitTestLib
{
# UnitTestLib <lib> : <sources> : <libraries> ;
Expand Down Expand Up @@ -30,7 +36,7 @@ rule UnitTestLib
MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ;
SharedLibrary $(lib) : $(sources) : $(libraries) libcppunit.so ;

Depends unittests : $(lib) ;
UnitTestDependency $(lib) ;
}


Expand Down Expand Up @@ -60,7 +66,7 @@ rule UnitTest
SimpleTest $(target) : $(sources) : $(libraries) libcppunit.so
: $(resources) ;

Depends unittests : $(target) ;
UnitTestDependency $(target) ;
}


Expand Down
2 changes: 2 additions & 0 deletions src/tests/kits/app/bapplication/testapps/Jamfile
Expand Up @@ -42,6 +42,8 @@ rule CopyBAppTestApp
File $(target) : $(source) ;
MODE on $(target) = $(EXEMODE) ;
MimeSet $(target) ;

UnitTestDependency $(target) ;
}

# BApplication::BApplication() test apps
Expand Down

0 comments on commit 6abbd31

Please sign in to comment.