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
|
|
1 | 1 | # unit test pseudo target |
2 | 2 | NotFile unittests ; |
3 | 3 | |
| 4 | rule UnitTestDependency |
| 5 | { |
| 6 | Depends unittests : $(1) ; |
| 7 | } |
| 8 | |
| 9 | |
4 | 10 | rule UnitTestLib |
5 | 11 | { |
6 | 12 | # UnitTestLib <lib> : <sources> : <libraries> ; |
… |
… |
rule UnitTestLib
|
30 | 36 | MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ; |
31 | 37 | SharedLibrary $(lib) : $(sources) : $(libraries) libcppunit.so ; |
32 | 38 | |
33 | | Depends unittests : $(lib) ; |
| 39 | UnitTestDependency $(lib) ; |
34 | 40 | } |
35 | 41 | |
36 | 42 | |
… |
… |
rule UnitTest
|
60 | 66 | SimpleTest $(target) : $(sources) : $(libraries) libcppunit.so |
61 | 67 | : $(resources) ; |
62 | 68 | |
63 | | Depends unittests : $(target) ; |
| 69 | UnitTestDependency $(target) ; |
64 | 70 | } |
65 | 71 | |
66 | 72 | |
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
|
42 | 42 | File $(target) : $(source) ; |
43 | 43 | MODE on $(target) = $(EXEMODE) ; |
44 | 44 | MimeSet $(target) ; |
| 45 | |
| 46 | UnitTestDependency $(target) ; |
45 | 47 | } |
46 | 48 | |
47 | 49 | # BApplication::BApplication() test apps |