Fixed unit tests build for platforms libbe_test and r5. Only randomly tested

a few whether they actually work.
New pseudo target "unittests", which builds all unit tests for the currently
set TARGET_PLATFORM. They are placed in generated/tests/<platform>/unittests.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14791 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2005-11-09 16:17:31 +00:00
parent 5e3af71d64
commit 155b583ac3
46 changed files with 253 additions and 465 deletions
+5
View File
@@ -626,6 +626,11 @@ HAIKU_TMP_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) tmp ] ;
HAIKU_PACKAGE_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) packages ] ; HAIKU_PACKAGE_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) packages ] ;
HAIKU_PACKAGE_OBJECT_DIR ?= [ FDirName $(HAIKU_OBJECT_DIR) packages ] ; HAIKU_PACKAGE_OBJECT_DIR ?= [ FDirName $(HAIKU_OBJECT_DIR) packages ] ;
TARGET_TEST_DIR ?= [ FDirName $(HAIKU_TEST_DIR)
$(TARGET_PLATFORM) ] ;
TARGET_UNIT_TEST_DIR ?= [ FDirName $(TARGET_TEST_DIR) unittests ] ;
TARGET_UNIT_TEST_LIB_DIR ?= [ FDirName $(TARGET_UNIT_TEST_DIR) lib ] ;
# automatically setup the objects directory per subdirectory # automatically setup the objects directory per subdirectory
SUBDIRRULES += SetupObjectsDir ; SUBDIRRULES += SetupObjectsDir ;
+53 -220
View File
@@ -1,250 +1,84 @@
# test pseudo targets
NOTFILE obostests ;
NOTFILE r5tests ;
rule CommonTestLib # unit test pseudo target
NotFile unittests ;
rule UnitTestLib
{ {
# CommonTestLib <target> : <sources> : <obos libraries> # UnitTestLib <lib> : <sources> : <libraries> ;
# : <r5 libraries> : <test libraries> : <public headers>; #
# Builds a unit test for both OBOS and R5 modules. local lib = $(1) ;
# <target> The name of the target.
# <sources> The list of sources.
# <obos libraries> A list of link libraries for the OBOS tests (as passed
# to LinkAgainst).
# <r5 libraries> A list of link libraries for the R5 tests (as passed
# to LinkAgainst).
# <test libraries> A list of link libraries for both OBOS tests and R5 tests
# that have a common name (i.e. specify libx.so and the OBOS tests will link
# to libx.so and the R5 tests will link to libx_r5.so).
# <public headers> A list of public header dirs (as passed to
# UsePublicHeaders).
TestLib $(1) : $(2) : [ FDirName $(HAIKU_TEST_DIR) unittester lib ] : $(3) $(5) : $(6) ;
R5TestLib $(1) : $(2) : [ FDirName $(HAIKU_TEST_DIR) unittester_r5 lib ] : $(4) [ R5SharedLibraryNames $(5) ] ;
}
rule TestLib
{
# TestLib <target> : <sources> : <dest> : <libraries> : <public headers>
# Builds a unit test library for an OBOS module.
# <target> The name of the target.
# <sources> The list of sources.
# <dest> The directory for the target (as passed to FDirName).
# <libraries> A list of link libraries (as passed to LinkAgainst).
# <public headers> A list of public header dirs (as passed to
# UsePublicHeaders).
local target = $(1) ;
local sources = $(2) ; local sources = $(2) ;
local dest = $(3) ; local libraries = $(3) ;
local libraries = $(4) ;
local headerDirs = $(5) ; # unless NO_TEST_DEBUG is defined, we turn on debugging
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ; if ! $(NO_TEST_DEBUG) {
DEBUG on $(lib) [ FGristFiles $(sources:S=$(SUFOBJ)) ] ?= 1 ;
}
# Our Main replacement. # define TEST_R5/TEST_HAIKU depending on the platform we build for
MakeLocate $(target) : $(dest) ; if $(TARGET_PLATFORM) = libbe_test {
MainFromObjects $(target) : $(objects) ; ObjectDefines $(2) : TEST_HAIKU TEST_OBOS ;
TestObjects $(sources) : $(headerDirs) ;
Depends $(target) : libcppunit.so ; # make the target depend on the installed libbe libraries
Depends obostests : $(target) ; Depends $(lib) :
LinkAgainst $(target) : libcppunit.so $(libraries) ; <tests!unittests>libbe_haiku.so <tests!unittests>libbeadapter.so ;
LINKFLAGS on $(target) = $(LINKFLAGS) -nostart -Xlinker -soname=\"$(target)\" ; } else {
} ObjectDefines $(2) : TEST_R5 ;
}
rule R5TestLib UseCppUnitObjectHeaders $(sources) ;
{
# R5TestLib <target> : <sources> : <dest> : <libraries>
# Builds a unit test for an R5 module. "_r5" is appended to the object
# and the target name.
# <target> The name of the target.
# <sources> The list of sources.
# <dest> The directory for the target (as passed to FDirName).
# <libraries> A list of link libraries (as passed to LinkAgainst).
local target = $(1:B)_r5$(1:S) ; MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ;
local sources = $(2) ; SharedLibrary $(lib) : $(sources) : $(libraries) libcppunit.so ;
local dest = $(3) ;
local libraries = $(4) ;
local objects = [ R5ObjectNames $(sources) ] ;
# Our Main replacement. Depends unittests : $(lib) ;
MakeLocate $(target) : $(dest) ;
MainFromObjects $(target) : $(objects) ;
TestObjects $(sources) : : true ;
Depends $(target) : libcppunit.so ;
Depends r5tests : $(target) ;
LinkAgainst $(target) : libcppunit.so $(libraries) ;
LINKFLAGS on $(target) = $(LINKFLAGS) -nostart -Xlinker -soname=\"$(target)\" ;
}
rule CommonUnitTest
{
# CommonUnitTest <target> : <sources> : <dest> : <obos libraries>
# : <r5 libraries> : <public headers>;
# Builds a unit test for both OBOS and R5 modules.
# <target> The name of the target.
# <sources> The list of sources.
# <dest> The directory for the target (as passed to FDirName).
# <obos libraries> A list of link libraries for the OBOS tests (as passed
# to LinkAgainst).
# <r5 libraries> A list of link libraries for the R5 tests (as passed
# to LinkAgainst).
# <public headers> A list of public header dirs (as passed to
# UsePublicHeaders).
UnitTest $(1) : $(2) : $(3) : $(4) : $(6) ;
R5UnitTest $(1) : $(2) : $(3) : $(5) ;
} }
rule UnitTest rule UnitTest
{ {
# UnitTest <target> : <sources> : <dest> : <libraries> : <public headers> # UnitTest <target> : <sources> : <libraries> : <resources> ;
# Builds a unit test for an OBOS module. #
# <target> The name of the target.
# <sources> The list of sources.
# <dest> The directory for the target (as passed to FDirName).
# <libraries> A list of link libraries (as passed to LinkAgainst).
# <public headers> A list of public header dirs (as passed to
# UsePublicHeaders).
local target = $(1) ; local target = $(1) ;
local sources = $(2) ; local sources = $(2) ;
local dest = $(3) ; local libraries = $(3) ;
local libraries = $(4) ; local resources = $(4) ;
local headerDirs = $(5) ;
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
# Our Main replacement. # define TEST_R5/TEST_HAIKU depending on the platform we build for
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) $(dest) ] ; if $(TARGET_PLATFORM) = libbe_test {
MainFromObjects $(target) : $(objects) ; ObjectDefines $(2) : TEST_HAIKU TEST_OBOS ;
TestObjects $(sources) : $(headerDirs) ;
Depends $(target) : libcppunit.so ; # make the target depend on the installed libbe libraries
Depends obostests : $(target) ; Depends $(target) :
LinkAgainst $(target) : libcppunit.so $(libraries) ; <tests!unittests>libbe_haiku.so <tests!unittests>libbeadapter.so ;
} } else {
ObjectDefines $(2) : TEST_R5 ;
rule R5UnitTest
{
# R5UnitTest <target> : <sources> : <dest> : <libraries>
# Builds a unit test for an R5 module. "_r5" is appended to the object
# and the target name.
# <target> The name of the target.
# <sources> The list of sources.
# <dest> The directory for the target (as passed to FDirName).
# <libraries> A list of link libraries (as passed to LinkAgainst).
local target = $(1)_r5 ;
local sources = $(2) ;
local dest = $(3) ;
local libraries = $(4) ;
local objects = [ R5ObjectNames $(sources) ] ;
# Our Main replacement.
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) $(dest) ] ;
MainFromObjects $(target) : $(objects) ;
TestObjects $(sources) : : true ;
Depends $(target) : libcppunit.so ;
Depends r5tests : $(target) ;
LinkAgainst $(target) : libcppunit.so $(libraries) ;
}
rule R5ObjectNames
{
# R5ObjectNames <sources> ;
# Returns a list of gristed object names given a list of source file names.
# Moreover each object names gets "_r5" inserted before the object suffix.
local objects = $(1:S=)_r5 ;
return [ FGristFiles $(objects:S=$(SUFOBJ)) ] ;
}
rule R5Objects
{
# R5Objects <sources>
# Similar to Objects, but appends "_r5" to the object file names and
# removes `-nostdinc' from the CC and C++ flags to enable system headers.
# <sources> The source files.
# Remove `-nostdinc' from CCFLAGS and C++FLAGS.
local oldCCFLAGS = $(CCFLAGS) ;
local oldC++FLAGS = $(C++FLAGS) ;
CCFLAGS = [ FFilter $(CCFLAGS) : -nostdinc ] ;
C++FLAGS = [ FFilter $(C++FLAGS) : -nostdinc ] ;
local sources = $(1) ;
local source ;
for source in [ FGristFiles $(sources) ]
{
local object = [ R5ObjectNames $(source) ] ;
Object $(object) : $(source) ;
LocalDepends obj : $(object) ;
} }
# Reset CCFLAGS and C++FLAGS to original values. UseCppUnitObjectHeaders $(sources) ;
CCFLAGS = $(oldCCFLAGS) ;
C++FLAGS = $(oldC++FLAGS) ; MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
SimpleTest $(target) : $(sources) : $(libraries) libcppunit.so
: $(resources) ;
Depends unittests : $(lib) ;
} }
rule TestObjects rule TestObjects
{ {
# TestLib <sources> : <public headers> : <r5> # TestObjects <sources> ;
# Compiles objects for tests. #
# <sources> The list of sources.
# <public headers> A list of public header dirs (as passed to
# UsePublicHeaders).
# <r5> If set, "_r5" is appended to the object file names and
# <public headers> is ignored. Furthermore the pre-processor macro
# TEST_R5 is defined, TEST_OBOS otherwise.
local sources = $(1) ; local sources = $(1) ;
local headerDirs = $(2) ;
local r5 = $(3) ;
local objects ;
if $(r5) { # define TEST_R5/TEST_HAIKU depending on the platform we build for
objects = [ R5ObjectNames $(sources) ] ; if $(TARGET_PLATFORM) = libbe_test {
ObjectDefines $(2) : TEST_HAIKU TEST_OBOS ;
} else { } else {
objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ; ObjectDefines $(2) : TEST_R5 ;
} }
# Turn optimization off, if desired. UseCppUnitObjectHeaders $(sources) ;
if ! $(NO_TEST_DEBUG) {
OPTIM on $(objects) = ;
}
# set headers/defines Objects $(sources) ;
UseCppUnitObjectHeaders $(sources) : $(objects) ;
if $(r5) {
ObjectDefines $(sources) : TEST_R5 ;
} else {
UsePublicObjectHeaders $(sources) : $(headerDirs) : $(objects) ;
ObjectDefines $(sources) : TEST_OBOS ;
}
if ! $(NO_TEST_DEBUG) {
# Turn debugging on. That is usually desired for test code.
ObjectCcFlags $(objects) : $(DEBUG_FLAGS) ;
ObjectC++Flags $(objects) : $(DEBUG_FLAGS) ;
}
# compile
if $(r5) {
R5Objects $(sources) ;
} else {
Objects $(sources) ;
}
}
rule R5SharedLibraryNames
{
# R5SharedLibraryNames <sources> ;
# Returns a list of shared library names given a list of file names. NO
# GRISTING IS PERFORMED :-) However, each library names gets "_r5" inserted
# before the shared lib suffix.
return $(1:S=)_r5.so ;
} }
rule SimpleTest rule SimpleTest
@@ -262,7 +96,6 @@ rule SimpleTest
rule BuildPlatformTest rule BuildPlatformTest
{ {
# Usage BuildPlatformTest <target> : <sources> ; # Usage BuildPlatformTest <target> : <sources> ;
local target = $(1) ; local target = $(1) ;
local sources = $(2) ; local sources = $(2) ;
+1
View File
@@ -1,6 +1,7 @@
SubDir HAIKU_TOP src kits translation ; SubDir HAIKU_TOP src kits translation ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
if $(TARGET_PLATFORM) != haiku { if $(TARGET_PLATFORM) != haiku {
UsePublicHeaders translation ; UsePublicHeaders translation ;
+2 -1
View File
@@ -1,4 +1,5 @@
#include <ExampleTest.h> #include "ExampleTest.h"
#include <ThreadedTestCaller.h> #include <ThreadedTestCaller.h>
#include <cppunit/Test.h> #include <cppunit/Test.h>
#include <cppunit/TestCaller.h> #include <cppunit/TestCaller.h>
+2 -1
View File
@@ -1,6 +1,7 @@
#include <TestSuite.h> #include <TestSuite.h>
#include <TestSuiteAddon.h> #include <TestSuiteAddon.h>
#include <ExampleTest.h>
#include "ExampleTest.h"
BTestSuite* getTestSuite() { BTestSuite* getTestSuite() {
BTestSuite *suite = new BTestSuite("ExampleSuite"); BTestSuite *suite = new BTestSuite("ExampleSuite");
+15 -24
View File
@@ -1,37 +1,28 @@
SubDir HAIKU_TOP src tests ; SubDir HAIKU_TOP src tests ;
CommonTestLib libexampletest.so SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UnitTestLib libexampletest.so
: ExampleTestAddon.cpp : ExampleTestAddon.cpp
ExampleTest.cpp ExampleTest.cpp
: be stdc++.r4 : be $(TARGET_LIBSTDC++)
: be stdc++.r4
: :
; ;
UnitTest UnitTester UnitTest UnitTester
: UnitTester.cpp : UnitTesterHelper.cpp
: : be $(TARGET_LIBSTDC++)
: be stdc++.r4 : UnitTesterHelper.rsrc
:
; ;
AddResources UnitTesterHelper : UnitTesterHelper.rsrc ; # Install libbe and other libraries for target platform libbe_test.
UnitTest UnitTesterHelper if $(TARGET_PLATFORM) = libbe_test {
: UnitTesterHelper.cpp local libs = libbe_haiku.so libbeadapter.so libtranslation.so ;
: unittester HaikuInstall install-unittest-libs : $(TARGET_UNIT_TEST_LIB_DIR)
: be stdc++.r4 : $(libs)
: be stdc++.r4 : tests!unittests ;
: }
;
AddResources UnitTesterHelper_r5 : UnitTesterHelper.rsrc ;
R5UnitTest UnitTesterHelper
: UnitTesterHelper.cpp
: unittester_r5
: be stdc++.r4
: be stdc++.r4
:
;
SubInclude HAIKU_TOP src tests add-ons ; SubInclude HAIKU_TOP src tests add-ons ;
SubInclude HAIKU_TOP src tests apps ; SubInclude HAIKU_TOP src tests apps ;
+12 -5
View File
@@ -1,5 +1,10 @@
SubDir HAIKU_TOP src tests add-ons translators ; SubDir HAIKU_TOP src tests add-ons translators ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
local libtranslation = translation ;
# Let Jam know where to find some of our source files # Let Jam know where to find some of our source files
SEARCH_SOURCE += [ FDirName $(SUBDIR) bmptranslator ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) bmptranslator ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) pngtranslator ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) pngtranslator ] ;
@@ -7,15 +12,17 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) stxttranslator ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) tgatranslator ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) tgatranslator ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) tifftranslator ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) tifftranslator ] ;
CommonTestLib libtranslatorstest.so if $(TARGET_PLATFORM) = libbe_test {
UsePublicHeaders translation ;
libtranslation = <tests!unittests>libtranslation.so ;
}
UnitTestLib libtranslatorstest.so
: TranslatorTestAddOn.cpp : TranslatorTestAddOn.cpp
BMPTranslatorTest.cpp BMPTranslatorTest.cpp
PNGTranslatorTest.cpp PNGTranslatorTest.cpp
STXTTranslatorTest.cpp STXTTranslatorTest.cpp
TGATranslatorTest.cpp TGATranslatorTest.cpp
TIFFTranslatorTest.cpp TIFFTranslatorTest.cpp
: libtranslation.so be stdc++.r4 : $(libtranslation) be $(TARGET_LIBSTDC++)
: translation be stdc++.r4
:
: translation
; ;
+2 -1
View File
@@ -1,4 +1,3 @@
#include <AllocatorTest.h>
#include <ThreadedTestCaller.h> #include <ThreadedTestCaller.h>
#include <cppunit/Test.h> #include <cppunit/Test.h>
#include <cppunit/TestCaller.h> #include <cppunit/TestCaller.h>
@@ -8,6 +7,8 @@
#include <kernel/OS.h> #include <kernel/OS.h>
#include <TestUtils.h> #include <TestUtils.h>
#include "AllocatorTest.h"
#include "Allocator.h" #include "Allocator.h"
#include "PhysicalPartitionAllocator.h" #include "PhysicalPartitionAllocator.h"
+6 -4
View File
@@ -1,10 +1,14 @@
SubDir HAIKU_TOP src tests bin makeudfimage ; SubDir HAIKU_TOP src tests bin makeudfimage ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UsePublicHeaders add-ons/file_system ; # For fsproto.h
UsePrivateHeaders [ FDirName kernel util ] ; # For kernel_cpp.h UsePrivateHeaders [ FDirName kernel util ] ; # For kernel_cpp.h
SubDirHdrs [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems udf ] ; SubDirHdrs [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems udf ] ;
SubDirHdrs [ FDirName $(HAIKU_TOP) src bin makeudfimage ] ; SubDirHdrs [ FDirName $(HAIKU_TOP) src bin makeudfimage ] ;
TestLib libmakeudfimagetest.so UnitTestLib libmakeudfimagetest.so
: MakeudfimageTestAddon.cpp : MakeudfimageTestAddon.cpp
# test files # test files
AllocatorTest.cpp AllocatorTest.cpp
@@ -19,9 +23,7 @@ TestLib libmakeudfimagetest.so
UdfStructures.cpp UdfStructures.cpp
Utils.cpp Utils.cpp
: [ FDirName $(HAIKU_TEST_DIR) unittester lib ] : be $(TARGET_LIBSTDC++)
: be stdc++.r4
:
; ;
SEARCH on [ FGristFiles Allocator.cpp PhysicalPartitionAllocator.cpp ] SEARCH on [ FGristFiles Allocator.cpp PhysicalPartitionAllocator.cpp ]
@@ -1,6 +1,7 @@
#include <TestSuite.h> #include <TestSuite.h>
#include <TestSuiteAddon.h> #include <TestSuiteAddon.h>
#include <AllocatorTest.h>
#include "AllocatorTest.h"
BTestSuite* getTestSuite() { BTestSuite* getTestSuite() {
BTestSuite *suite = new BTestSuite("makeudfimage"); BTestSuite *suite = new BTestSuite("makeudfimage");
+5 -5
View File
@@ -1,12 +1,15 @@
SubDir HAIKU_TOP src tests kernel core util ; SubDir HAIKU_TOP src tests kernel core util ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders [ FDirName kernel util ] ; UsePrivateHeaders [ FDirName kernel util ] ;
UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName kernel ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src tests kits app ] ; UseHeaders [ FDirName $(HAIKU_TOP) src tests kits app ] ;
# Two versions of the test lib are not really needed until # Two versions of the test lib are not really needed until
# we start linking to Be libraries, but it doesn't hurt... # we start linking to Be libraries, but it doesn't hurt...
CommonTestLib libkernelutilstest.so UnitTestLib libkernelutilstest.so
: KernelUtilsTestAddon.cpp : KernelUtilsTestAddon.cpp
# AVLTreeMapTest.cpp # AVLTreeMapTest.cpp
SinglyLinkedListTest.cpp SinglyLinkedListTest.cpp
@@ -14,9 +17,6 @@ CommonTestLib libkernelutilstest.so
VectorMapTest.cpp VectorMapTest.cpp
VectorSetTest.cpp VectorSetTest.cpp
VectorTest.cpp VectorTest.cpp
: stdc++.r4 : $(TARGET_LIBSTDC++)
: stdc++.r4
:
:
; ;
@@ -1,11 +1,12 @@
#include <TestSuite.h> #include <TestSuite.h>
#include <TestSuiteAddon.h> #include <TestSuiteAddon.h>
//#include <AVLTreeMapTest.h>
#include <SinglyLinkedListTest.h> //#include "AVLTreeMapTest.h"
#include <DoublyLinkedListTest.h> #include "SinglyLinkedListTest.h"
#include <VectorMapTest.h> #include "DoublyLinkedListTest.h"
#include <VectorSetTest.h> #include "VectorMapTest.h"
#include <VectorTest.h> #include "VectorSetTest.h"
#include "VectorTest.h"
BTestSuite* getTestSuite() { BTestSuite* getTestSuite() {
@@ -1,10 +1,10 @@
#include <SinglyLinkedListTest.h>
#include <cppunit/Test.h> #include <cppunit/Test.h>
#include <cppunit/TestCaller.h> #include <cppunit/TestCaller.h>
#include <cppunit/TestSuite.h> #include <cppunit/TestSuite.h>
#include <stdio.h> #include <stdio.h>
#include <TestUtils.h> #include <TestUtils.h>
#include "SinglyLinkedListTest.h"
#include "SinglyLinkedList.h" #include "SinglyLinkedList.h"
SinglyLinkedListTest::SinglyLinkedListTest(std::string name) SinglyLinkedListTest::SinglyLinkedListTest(std::string name)
+19 -23
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src tests kits app ; SubDir HAIKU_TOP src tests kits app ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders app ; UsePrivateHeaders app ;
# Let Jam know where to find some of our source files # Let Jam know where to find some of our source files
@@ -17,21 +20,20 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) broster ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) broster testapps ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) broster testapps ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) common ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) common ] ;
CommonTestLib libmessagetest.so # TODO: bonefish: There is no MessageTestAddon.cpp. Remove, if noone uses
: MessageTestAddon.cpp # this.
MessageTest.cpp #UnitTestLib libmessagetest.so
MessageConstructTest.cpp # : MessageTestAddon.cpp
MessageDestructTest.cpp # MessageTest.cpp
MessageOpAssignTest.cpp # MessageConstructTest.cpp
MessageEasyFindTest.cpp # MessageDestructTest.cpp
MessageSpeedTest.cpp # MessageOpAssignTest.cpp
: be stdc++.r4 # MessageEasyFindTest.cpp
: be stdc++.r4 # MessageSpeedTest.cpp
: # : be $(TARGET_LIBSTDC++)
: app #;
;
CommonTestLib libapptest.so UnitTestLib libapptest.so
: AppKitTestAddon.cpp : AppKitTestAddon.cpp
# BApplication # BApplication
@@ -151,18 +153,12 @@ CommonTestLib libapptest.so
AppRunner.cpp AppRunner.cpp
PipedAppRunner.cpp PipedAppRunner.cpp
: be stdc++.r4 : be $(TARGET_LIBSTDC++)
: be stdc++.r4
:
: app support
; ;
CommonTestLib libappteststub.so UnitTestLib libappteststub.so
: AppKitTestStub.cpp : AppKitTestStub.cpp
: libapptest.so stdc++.r4 : libapptest.so $(TARGET_LIBSTDC++)
: libapptest_r5.so stdc++.r4
:
:
; ;
SimpleTest DanoMessageTest : SimpleTest DanoMessageTest :
@@ -1,8 +1,11 @@
SubDir HAIKU_TOP src tests kits app bapplication testapps ; SubDir HAIKU_TOP src tests kits app bapplication testapps ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app common ] ; SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app common ] ;
local commonObjects = <src!tests!kits!app!common>CommonTestApp$(SUFOBJ) ; local commonObjects = <src!tests!kits!app!common>CommonTestApp.o ;
rule SimpleBAppTestApp rule SimpleBAppTestApp
{ {
@@ -17,29 +20,16 @@ rule SimpleBAppTestApp
rule SimpleBAppTestApp2 rule SimpleBAppTestApp2
{ {
# SimpleBAppTestApp <name> : <sources> : <resources> : <use objects> ; # SimpleBAppTestApp2 <name> : <sources> : <resources> : <use objects> ;
local name = $(1) ; local name = $(1) ;
local sources = $(2) ; local sources = $(2) ;
local resources = $(3) ; local resources = $(3) ;
local useObjects = $(4) ; local useObjects = $(4) ;
local r5name = $(name)_r5 ;
local useR5Objects ; UnitTest $(name)
local object ;
for object in $(useObjects) {
useR5Objects += $(object:B=$(object:B)_r5) ;
}
if $(resources) {
AddResources $(name) : $(resources) ;
AddResources $(r5name) : $(resources) ;
}
CommonUnitTest $(name)
: $(sources) : $(sources)
: kits app : be $(TARGET_LIBSTDC++) $(useObjects)
: be stdc++.r4 $(useObjects) : $(resources)
: be stdc++.r4 $(useR5Objects)
: app support
; ;
} }
@@ -48,17 +38,11 @@ rule CopyBAppTestApp
# CopyBAppTestApp <target> : <source> ; # CopyBAppTestApp <target> : <source> ;
local target = $(1) ; local target = $(1) ;
local source = $(2) ; local source = $(2) ;
local r5target = $(target)_r5 ;
local r5source = $(source)_r5 ; MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
MakeLocate $(r5target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
File $(target) : $(source) ; File $(target) : $(source) ;
File $(r5target) : $(r5source) ; MODE on $(target) = $(EXEMODE) ;
local file ; MimeSet $(target) ;
for file in $(target) $(r5target) {
MODE on $(file) = $(EXEMODE) ;
MimeSet $(file) ;
}
} }
# BApplication::BApplication() test apps # BApplication::BApplication() test apps
@@ -12,11 +12,7 @@
// Standard Includes ----------------------------------------------------------- // Standard Includes -----------------------------------------------------------
#include <iostream> #include <iostream>
#include <stdio.h> #include <stdio.h>
#ifdef TEST_OBOS
#include <posix/typeinfo>
#else
#include <typeinfo> #include <typeinfo>
#endif
#include <posix/string.h> #include <posix/string.h>
// System Includes ------------------------------------------------------------- // System Includes -------------------------------------------------------------
+5 -5
View File
@@ -1,12 +1,12 @@
SubDir HAIKU_TOP src tests kits app bmessenger ; SubDir HAIKU_TOP src tests kits app bmessenger ;
CommonUnitTest SMRemoteTargetApp SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UnitTest SMRemoteTargetApp
: SMRemoteTargetApp.cpp : SMRemoteTargetApp.cpp
SMLooper.cpp SMLooper.cpp
: kits app : be $(TARGET_LIBSTDC++)
: be stdc++.r4
: be stdc++.r4
: app support
; ;
SubInclude HAIKU_TOP src tests kits app bmessenger testapps ; SubInclude HAIKU_TOP src tests kits app bmessenger testapps ;
+11 -27
View File
@@ -1,8 +1,11 @@
SubDir HAIKU_TOP src tests kits app bmessenger testapps ; SubDir HAIKU_TOP src tests kits app bmessenger testapps ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app common ] ; SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app common ] ;
local commonObjects = <src!tests!kits!app!common>CommonTestApp$(SUFOBJ) ; local commonObjects = <src!tests!kits!app!common>CommonTestApp.o ;
rule SimpleBMessengerTestApp rule SimpleBMessengerTestApp
{ {
@@ -23,24 +26,11 @@ rule SimpleBMessengerTestApp2
local sources = $(2) ; local sources = $(2) ;
local resources = $(3) ; local resources = $(3) ;
local useObjects = $(4) ; local useObjects = $(4) ;
local r5name = $(name)_r5 ;
local useR5Objects ; UnitTest $(name)
local object ;
for object in $(useObjects) {
useR5Objects += $(object:B=$(object:B)_r5) ;
}
if $(resources) {
AddResources $(name) : $(resources) ;
AddResources $(r5name) : $(resources) ;
}
CommonUnitTest $(name)
: $(sources) : $(sources)
: kits app : be $(TARGET_LIBSTDC++) $(useObjects)
: be stdc++.r4 $(useObjects) : $(resources)
: be stdc++.r4 $(useR5Objects)
: app support
; ;
} }
@@ -49,17 +39,11 @@ rule CopyBMessengerTestApp
# CopyBMessengerTestApp <target> : <source> ; # CopyBMessengerTestApp <target> : <source> ;
local target = $(1) ; local target = $(1) ;
local source = $(2) ; local source = $(2) ;
local r5target = $(target)_r5 ;
local r5source = $(source)_r5 ; MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
MakeLocate $(r5target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
File $(target) : $(source) ; File $(target) : $(source) ;
File $(r5target) : $(r5source) ; MODE on $(target) = $(EXEMODE) ;
local file ; MimeSet $(target) ;
for file in $(target) $(r5target) {
MODE on $(file) = $(EXEMODE) ;
MimeSet $(file) ;
}
} }
# BMessenger::BMessenger() test apps # BMessenger::BMessenger() test apps
+10 -26
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src tests kits app broster testapps ; SubDir HAIKU_TOP src tests kits app broster testapps ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
#SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app common ] ; #SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app common ] ;
SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app broster ] ; SubDirHdrs [ FDirName $(HAIKU_TOP) src tests kits app broster ] ;
@@ -25,24 +28,11 @@ rule SimpleBRosterTestApp2
local sources = $(2) ; local sources = $(2) ;
local resources = $(3) ; local resources = $(3) ;
local useObjects = $(4) ; local useObjects = $(4) ;
local r5name = $(name)_r5 ;
local useR5Objects ; UnitTest $(name)
local object ;
for object in $(useObjects) {
useR5Objects += $(object:B=$(object:B)_r5) ;
}
if $(resources) {
AddResources $(name) : $(resources) ;
AddResources $(r5name) : $(resources) ;
}
CommonUnitTest $(name)
: $(sources) : $(sources)
: kits app : be $(TARGET_LIBSTDC++) $(useObjects)
: be stdc++.r4 $(useObjects) : $(resources)
: be stdc++.r4 $(useR5Objects)
: app support
; ;
} }
@@ -51,17 +41,11 @@ rule CopyBRosterTestApp
# CopyBRosterTestApp <target> : <source> ; # CopyBRosterTestApp <target> : <source> ;
local target = $(1) ; local target = $(1) ;
local source = $(2) ; local source = $(2) ;
local r5target = $(target)_r5 ;
local r5source = $(source)_r5 ; MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
MakeLocate $(r5target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
File $(target) : $(source) ; File $(target) : $(source) ;
File $(r5target) : $(r5source) ; MODE on $(target) = $(EXEMODE) ;
local file ; MimeSet $(target) ;
for file in $(target) $(r5target) {
MODE on $(file) = $(EXEMODE) ;
MimeSet $(file) ;
}
} }
# BRoster::Launch() test apps # BRoster::Launch() test apps
@@ -1,4 +1,4 @@
#include <RecentAppsTestApp.h> #include "RecentAppsTestApp.h"
int main() { int main() {
RecentAppsTestApp app(kRecentAppsTestAppSigs[kControlApp]); RecentAppsTestApp app(kRecentAppsTestAppSigs[kControlApp]);
@@ -1,4 +1,4 @@
#include <RecentAppsTestApp.h> #include "RecentAppsTestApp.h"
int main() { int main() {
RecentAppsTestApp app(kRecentAppsTestAppSigs[kEmptyApp]); RecentAppsTestApp app(kRecentAppsTestAppSigs[kEmptyApp]);
@@ -1,4 +1,4 @@
#include <RecentAppsTestApp.h> #include "RecentAppsTestApp.h"
int main() { int main() {
RecentAppsTestApp app(kRecentAppsTestAppSigs[kNonQualifyingApp]); RecentAppsTestApp app(kRecentAppsTestAppSigs[kNonQualifyingApp]);
@@ -1,4 +1,4 @@
#include <RecentAppsTestApp.h> #include "RecentAppsTestApp.h"
int main() { int main() {
RecentAppsTestApp app(kRecentAppsTestAppSigs[kQualifyingApp]); RecentAppsTestApp app(kRecentAppsTestAppSigs[kQualifyingApp]);
+4 -2
View File
@@ -1,5 +1,7 @@
SubDir HAIKU_TOP src tests kits app common ; SubDir HAIKU_TOP src tests kits app common ;
TestObjects CommonTestApp.cpp : app support ; SetSubDirSupportedPlatformsBeOSCompatible ;
TestObjects CommonTestApp.cpp : : true ; AddSubDirSupportedPlatforms libbe_test ;
TestObjects CommonTestApp.cpp ;
+5 -5
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src tests kits interface ; SubDir HAIKU_TOP src tests kits interface ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders interface ; UsePrivateHeaders interface ;
# Let Jam know where to find some of our source files # Let Jam know where to find some of our source files
@@ -12,7 +15,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) bwidthbuffer ] ;
SEARCH_SOURCE += [ FDirName $(TOP) src kits interface ] ; SEARCH_SOURCE += [ FDirName $(TOP) src kits interface ] ;
CommonTestLib libinterfacetest.so UnitTestLib libinterfacetest.so
: InterfaceKitTestAddon.cpp : InterfaceKitTestAddon.cpp
GraphicsDefsTest.cpp GraphicsDefsTest.cpp
@@ -50,10 +53,7 @@ CommonTestLib libinterfacetest.so
WidthBufferTest.cpp WidthBufferTest.cpp
WidthBufferSimpleTest.cpp WidthBufferSimpleTest.cpp
: be stdc++.r4 : be $(TARGET_LIBSTDC++)
: be stdc++.r4
:
: app support
; ;
ObjectDefines ObjectDefines
@@ -20,6 +20,7 @@ const char *k40X = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const char *k60X = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; const char *k60X = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
// Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color) // Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color)
#if TEST_R5
bool operator==(const rgb_color &left, const rgb_color &right) bool operator==(const rgb_color &left, const rgb_color &right)
{ {
if (left.red == right.red && left.green == right.green && if (left.red == right.red && left.green == right.green &&
@@ -28,6 +29,8 @@ bool operator==(const rgb_color &left, const rgb_color &right)
else else
return false; return false;
} }
#endif // TEST_R5
// Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color) // Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color)
ostream &operator<<(ostream &stream, const rgb_color &clr) ostream &operator<<(ostream &stream, const rgb_color &clr)
{ {
+2 -1
View File
@@ -3,9 +3,10 @@
#ifndef APP_FILE_INFO_TEST_H #ifndef APP_FILE_INFO_TEST_H
#define APP_FILE_INFO_TEST_H #define APP_FILE_INFO_TEST_H
#include "BasicTest.h"
#include <StorageDefs.h> #include <StorageDefs.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#include <BasicTest.h>
class BApplication; class BApplication;
class BBitmap; class BBitmap;
+2 -2
View File
@@ -10,12 +10,12 @@
#include <cppunit/TestCaller.h> #include <cppunit/TestCaller.h>
#include <cppunit/TestSuite.h> #include <cppunit/TestSuite.h>
#include <EntryTest.h>
#include <Entry.h> #include <Entry.h>
#include <Directory.h> #include <Directory.h>
#include <Path.h> #include <Path.h>
#include "EntryTest.h"
enum test_entry_kind { enum test_entry_kind {
DIR_ENTRY, DIR_ENTRY,
FILE_ENTRY, FILE_ENTRY,
+7 -13
View File
@@ -1,8 +1,11 @@
SubDir HAIKU_TOP src tests kits storage ; SubDir HAIKU_TOP src tests kits storage ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UsePrivateHeaders storage ; UsePrivateHeaders storage ;
CommonTestLib libstoragetest.so UnitTestLib libstoragetest.so
: StorageKitTestAddon.cpp : StorageKitTestAddon.cpp
AppFileInfoTest.cpp AppFileInfoTest.cpp
BasicTest.cpp BasicTest.cpp
@@ -22,24 +25,15 @@ CommonTestLib libstoragetest.so
SymLinkTest.cpp SymLinkTest.cpp
TestApp.cpp TestApp.cpp
VolumeTest.cpp VolumeTest.cpp
: be stdc++.r4 : be $(TARGET_LIBSTDC++)
: be stdc++.r4
:
: storage
; ;
# To run the tests some test files must be around. # To run the tests some test files must be around.
{ {
# OBOS
local resdir = <storage!kit!test!files>resources ; local resdir = <storage!kit!test!files>resources ;
MakeLocate $(resdir) : [ on UnitTesterHelper return $(LOCATE[1]) ] ; MakeLocate $(resdir) : $(TARGET_UNIT_TEST_DIR) ;
RelSymLink $(resdir) : [ FDirName $(SUBDIR) resources ] : false ; RelSymLink $(resdir) : [ FDirName $(SUBDIR) resources ] : false ;
DEPENDS libstoragetest.so : $(resdir) ; Depends libstoragetest.so : $(resdir) ;
# R5
local resdir_r5 = <storage!kit!test!files!r5>resources ;
MakeLocate $(resdir_r5) : [ on UnitTesterHelper_r5 return $(LOCATE[1]) ] ;
RelSymLink $(resdir_r5) : [ FDirName $(SUBDIR) resources ] : false ;
DEPENDS libstoragetest_r5.so : $(resdir_r5) ;
} }
SubInclude HAIKU_TOP src tests kits storage disk_device ; SubInclude HAIKU_TOP src tests kits storage disk_device ;
+2 -1
View File
@@ -1,6 +1,7 @@
// MimeSnifferTest.cpp // MimeSnifferTest.cpp
#include <MimeSnifferTest.h> #include "MimeSnifferTest.h"
#include <cppunit/Test.h> #include <cppunit/Test.h>
#include <cppunit/TestSuite.h> #include <cppunit/TestSuite.h>
#include <cppunit/TestCaller.h> #include <cppunit/TestCaller.h>
+2 -1
View File
@@ -22,7 +22,6 @@
#if !TEST_R5 #if !TEST_R5
#include <mime/database_support.h> #include <mime/database_support.h>
#endif #endif
#include <MimeTypeTest.h>
#include <Path.h> // Only needed for entry_ref dumps #include <Path.h> // Only needed for entry_ref dumps
#include <StorageKit.h> #include <StorageKit.h>
#include <String.h> #include <String.h>
@@ -32,6 +31,8 @@
#include "TestApp.h" #include "TestApp.h"
#include "TestUtils.h" #include "TestUtils.h"
#include "MimeTypeTest.h"
// MIME database directories // MIME database directories
static const char *testDir = "/tmp/mimeTestDir"; static const char *testDir = "/tmp/mimeTestDir";
static const char *R5DatabaseDir = "/boot/home/config/settings/beos_mime"; static const char *R5DatabaseDir = "/boot/home/config/settings/beos_mime";
+2 -1
View File
@@ -3,9 +3,10 @@
#ifndef NODE_INFO_TEST_H #ifndef NODE_INFO_TEST_H
#define NODE_INFO_TEST_H #define NODE_INFO_TEST_H
#include "BasicTest.h"
#include <StorageDefs.h> #include <StorageDefs.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#include <BasicTest.h>
class BApplication; class BApplication;
class BBitmap; class BBitmap;
+2 -1
View File
@@ -4,7 +4,6 @@
#include <cppunit/TestCaller.h> #include <cppunit/TestCaller.h>
#include <cppunit/TestSuite.h> #include <cppunit/TestSuite.h>
#include <TestUtils.h> #include <TestUtils.h>
#include <NodeTest.h>
#include <errno.h> #include <errno.h>
#include <fs_attr.h> // For struct attr_info #include <fs_attr.h> // For struct attr_info
@@ -19,6 +18,8 @@
#include <String.h> #include <String.h>
#include <TypeConstants.h> #include <TypeConstants.h>
#include "NodeTest.h"
// == for attr_info // == for attr_info
static static
+2 -2
View File
@@ -1,6 +1,6 @@
// PathTest.cpp // PathTest.cpp
#include <PathTest.h> #include "PathTest.h"
//#include "StorageKitTester.h"
#include <cppunit/Test.h> #include <cppunit/Test.h>
#include <cppunit/TestCaller.h> #include <cppunit/TestCaller.h>
#include <cppunit/TestSuite.h> #include <cppunit/TestSuite.h>
+2 -1
View File
@@ -3,9 +3,10 @@
#ifndef __sk_path_test_h__ #ifndef __sk_path_test_h__
#define __sk_path_test_h__ #define __sk_path_test_h__
#include "BasicTest.h"
#include <StorageDefs.h> #include <StorageDefs.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#include <BasicTest.h>
class CppUnit::Test; class CppUnit::Test;
@@ -5,9 +5,6 @@
#include <unistd.h> #include <unistd.h>
#include <vector> #include <vector>
#include <ResourceStringsTest.h>
#include <ByteOrder.h> #include <ByteOrder.h>
#include <Entry.h> #include <Entry.h>
#include <File.h> #include <File.h>
@@ -19,6 +16,7 @@
#include <TypeConstants.h> #include <TypeConstants.h>
#include <TestShell.h> #include <TestShell.h>
#include "ResourceStringsTest.h"
static const char *testDir = "/tmp/testDir"; static const char *testDir = "/tmp/testDir";
static const char *x86ResFile = "/tmp/testDir/x86.rsrc"; static const char *x86ResFile = "/tmp/testDir/x86.rsrc";
+1 -3
View File
@@ -5,9 +5,6 @@
#include <unistd.h> #include <unistd.h>
#include <vector> #include <vector>
#include <ResourcesTest.h>
#include <ByteOrder.h> #include <ByteOrder.h>
#include <File.h> #include <File.h>
#include <Mime.h> #include <Mime.h>
@@ -16,6 +13,7 @@
#include <TypeConstants.h> #include <TypeConstants.h>
#include <TestShell.h> #include <TestShell.h>
#include "ResourcesTest.h"
static const char *testDir = "/tmp/testDir"; static const char *testDir = "/tmp/testDir";
static const char *x86ResFile = "/tmp/testDir/x86.rsrc"; static const char *x86ResFile = "/tmp/testDir/x86.rsrc";
+2 -1
View File
@@ -3,9 +3,10 @@
#ifndef VOLUME_TEST_H #ifndef VOLUME_TEST_H
#define VOLUME_TEST_H #define VOLUME_TEST_H
#include "BasicTest.h"
#include <StorageDefs.h> #include <StorageDefs.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#include <BasicTest.h>
class BTestApp; class BTestApp;
class BBitmap; class BBitmap;
+3
View File
@@ -1,4 +1,7 @@
SubDir HAIKU_TOP src tests kits storage testapps ; SubDir HAIKU_TOP src tests kits storage testapps ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
SimpleTest <test>clipboard : clipboard.cpp : be net ; SimpleTest <test>clipboard : clipboard.cpp : be net ;
SimpleTest dump_mime_types : dump_mime_types.cpp : be net ; SimpleTest dump_mime_types : dump_mime_types.cpp : be net ;
+5 -5
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src tests kits support ; SubDir HAIKU_TOP src tests kits support ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
# Let Jam know where to find some of our source files # Let Jam know where to find some of our source files
SEARCH_SOURCE += [ FDirName $(SUBDIR) barchivable ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) barchivable ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) bautolock ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) bautolock ] ;
@@ -8,7 +11,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) bmemoryio ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) bstring ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) bstring ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) bblockcache ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) bblockcache ] ;
CommonTestLib libsupporttest.so UnitTestLib libsupporttest.so
: SupportKitTestAddon.cpp : SupportKitTestAddon.cpp
ByteOrderTest.cpp ByteOrderTest.cpp
@@ -74,10 +77,7 @@ CommonTestLib libsupporttest.so
BlockCacheExerciseTest.cpp BlockCacheExerciseTest.cpp
BlockCacheConcurrencyTest.cpp BlockCacheConcurrencyTest.cpp
: be stdc++.r4 : be $(TARGET_LIBSTDC++) libsupporttest_RemoteTestObject.so
: be stdc++.r4
: libsupporttest_RemoteTestObject.so
: support
; ;
SubInclude HAIKU_TOP src tests kits support barchivable ; SubInclude HAIKU_TOP src tests kits support barchivable ;
@@ -1,15 +1,10 @@
SubDir HAIKU_TOP src tests kits support barchivable remoteobjectdef ; SubDir HAIKU_TOP src tests kits support barchivable remoteobjectdef ;
# Add the libraries' resource files. If this sort of thing is needed SetSubDirSupportedPlatformsBeOSCompatible ;
# anywhere else, we ought to make it into a real rule. AddSubDirSupportedPlatforms libbe_test ;
AddResources libsupporttest_RemoteTestObject.so : RemoteTestObject.rdef ;
AddResources libsupporttest_RemoteTestObject_r5.so : RemoteTestObject.rdef ;
CommonTestLib libsupporttest_RemoteTestObject.so UnitTestLib libsupporttest_RemoteTestObject.so
: RemoteTestObject.cpp : RemoteTestObject.cpp
: be stdc++.r4 : be $(LIBSTDC++)
: be stdc++.r4
:
: support
: RemoteTestObject.rdef : RemoteTestObject.rdef
; ;
+12 -5
View File
@@ -1,13 +1,20 @@
SubDir HAIKU_TOP src tests kits translation ; SubDir HAIKU_TOP src tests kits translation ;
CommonTestLib libtranslationtest.so SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
local libtranslation = translation ;
if $(TARGET_PLATFORM) = libbe_test {
UsePublicHeaders translation ;
libtranslation = <tests!unittests>libtranslation.so ;
}
UnitTestLib libtranslationtest.so
: TranslationKitTestAddon.cpp : TranslationKitTestAddon.cpp
TranslatorRosterTest.cpp TranslatorRosterTest.cpp
BitmapStreamTest.cpp BitmapStreamTest.cpp
TranslationUtilsTest.cpp TranslationUtilsTest.cpp
TranslatorTest.cpp TranslatorTest.cpp
: libtranslation.so be stdc++.r4 : $(libtranslation) be $(TARGET_LIBSTDC++)
: translation be stdc++.r4
:
: translation
; ;
+13 -23
View File
@@ -1,34 +1,28 @@
SubDir HAIKU_TOP src tools cppunit ; SubDir HAIKU_TOP src tools cppunit ;
UseHeaders [ FDirName $(HAIKU_TOP) headers tools elfsymbolpatcher ] ; SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UseHeaders [ FDirName $(HAIKU_TOP) headers tools elfsymbolpatcher ] : true ;
UseCppUnitHeaders ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) cppunit ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) cppunit ] ;
rule CppUnitLibrary
{ {
# CppUnitLibrary <sources> ; DEFINES += BUILDING_CPPUNIT ;
local _lib = libcppunit.so ;
local defines = BUILDING_CPPUNIT ; if $(OS) != BEOS || $(OSPLAT) = PPC {
DEFINES += NO_ELF_SYMBOL_PATCHING ;
if $(OS) = BEOS && $(OSPLAT) = PPC {
defines += NO_ELF_SYMBOL_PATCHING ;
} }
ObjectDefines $(1) : $(defines) ;
UseCppUnitHeaders ;
BuildPlatformMain $(_lib) : $(1) ;
MakeLocate $(_lib) : /boot/home/config/lib ;
LINKFLAGS on $(_lib) = $(LINKFLAGS) -nostart -Xlinker -soname=\"$(_lib)\" ;
} }
CppUnitLibrary SharedLibrary libcppunit.so :
BTestCase.cpp
BTestSuite.cpp
SemaphoreSyncObject.cpp SemaphoreSyncObject.cpp
TestApp.cpp TestApp.cpp
TestCase.cpp
TestListener.cpp TestListener.cpp
TestShell.cpp TestShell.cpp
TestSuite.cpp
TestUtils.cpp TestUtils.cpp
ThreadedTestCase.cpp ThreadedTestCase.cpp
@@ -55,13 +49,9 @@ CppUnitLibrary
TextTestResult.cpp TextTestResult.cpp
TypeInfoHelper.cpp TypeInfoHelper.cpp
XmlOutputter.cpp XmlOutputter.cpp
: be $(TARGET_LIBSTDC++)
; ;
LinkAgainst libcppunit.so : if $(OS) = BEOS && $(OSPLAT) != PPC {
stdc++.r4 # is called `mslcpp_4_0' on PPC -- just create a symlink
be
;
if $(OS) != BEOS || $(OSPLAT) != PPC {
LinkAgainst libcppunit.so : libelfsymbolpatcher.a ; LinkAgainst libcppunit.so : libelfsymbolpatcher.a ;
} }
+3
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src tools elfsymbolpatcher ; SubDir HAIKU_TOP src tools elfsymbolpatcher ;
SetSubDirSupportedPlatformsBeOSCompatible ;
AddSubDirSupportedPlatforms libbe_test ;
UseHeaders [ FDirName $(HAIKU_TOP) headers tools elfsymbolpatcher ] ; UseHeaders [ FDirName $(HAIKU_TOP) headers tools elfsymbolpatcher ] ;
StaticLibrary libelfsymbolpatcher.a StaticLibrary libelfsymbolpatcher.a