Ticket #12441: 0001-unittests-Build-copied-BAppTest-files.patch

File 0001-unittests-Build-copied-BAppTest-files.patch, 1.9 KB (added by simonsouth, 8 years ago)

Build copied BAppTest files as part of unittests target

  • build/jam/TestsRules

    From ef58f8fcd20b8f473d55511180a0a5a4c55732ba Mon Sep 17 00:00:00 2001
    From: Simon South <ssouth@simonsouth.com>
    Date: Sun, 1 Nov 2015 04:26:22 -0500
    Subject: [PATCH] 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.
    ---
     build/jam/TestsRules                             | 10 ++++++++--
     src/tests/kits/app/bapplication/testapps/Jamfile |  2 ++
     2 files changed, 10 insertions(+), 2 deletions(-)
    
    diff --git a/build/jam/TestsRules b/build/jam/TestsRules
    index 68f67ee..fc1c166 100644
    a b  
    11# unit test pseudo target
    22NotFile unittests ;
    33
     4rule UnitTestDependency
     5{
     6    Depends unittests : $(1) ;
     7}
     8
     9
    410rule UnitTestLib
    511{
    612    # UnitTestLib <lib> : <sources> : <libraries> ;
    rule UnitTestLib  
    3036    MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ;
    3137    SharedLibrary $(lib) : $(sources) : $(libraries) libcppunit.so ;
    3238
    33     Depends unittests : $(lib) ;
     39    UnitTestDependency $(lib) ;
    3440}
    3541
    3642
    rule UnitTest  
    6066    SimpleTest $(target) : $(sources) : $(libraries) libcppunit.so
    6167        : $(resources) ;
    6268
    63     Depends unittests : $(target) ;
     69    UnitTestDependency $(target) ;
    6470}
    6571
    6672
  • src/tests/kits/app/bapplication/testapps/Jamfile

    diff --git a/src/tests/kits/app/bapplication/testapps/Jamfile b/src/tests/kits/app/bapplication/testapps/Jamfile
    index 2f9d3f7..fc90743 100644
    a b rule CopyBAppTestApp  
    4242    File $(target) : $(source) ;
    4343    MODE on $(target) = $(EXEMODE) ;
    4444    MimeSet $(target) ;
     45
     46    UnitTestDependency $(target) ;
    4547}
    4648
    4749# BApplication::BApplication() test apps