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:
@@ -626,6 +626,11 @@ HAIKU_TMP_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) tmp ] ;
|
||||
HAIKU_PACKAGE_DIR ?= [ FDirName $(HAIKU_OUTPUT_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
|
||||
SUBDIRRULES += SetupObjectsDir ;
|
||||
|
||||
|
||||
+53
-220
@@ -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>
|
||||
# : <r5 libraries> : <test libraries> : <public headers>;
|
||||
# Builds a unit test for both OBOS and R5 modules.
|
||||
# <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) ;
|
||||
# UnitTestLib <lib> : <sources> : <libraries> ;
|
||||
#
|
||||
local lib = $(1) ;
|
||||
local sources = $(2) ;
|
||||
local dest = $(3) ;
|
||||
local libraries = $(4) ;
|
||||
local headerDirs = $(5) ;
|
||||
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
|
||||
local libraries = $(3) ;
|
||||
|
||||
# unless NO_TEST_DEBUG is defined, we turn on debugging
|
||||
if ! $(NO_TEST_DEBUG) {
|
||||
DEBUG on $(lib) [ FGristFiles $(sources:S=$(SUFOBJ)) ] ?= 1 ;
|
||||
}
|
||||
|
||||
# Our Main replacement.
|
||||
MakeLocate $(target) : $(dest) ;
|
||||
MainFromObjects $(target) : $(objects) ;
|
||||
TestObjects $(sources) : $(headerDirs) ;
|
||||
# define TEST_R5/TEST_HAIKU depending on the platform we build for
|
||||
if $(TARGET_PLATFORM) = libbe_test {
|
||||
ObjectDefines $(2) : TEST_HAIKU TEST_OBOS ;
|
||||
|
||||
Depends $(target) : libcppunit.so ;
|
||||
Depends obostests : $(target) ;
|
||||
LinkAgainst $(target) : libcppunit.so $(libraries) ;
|
||||
LINKFLAGS on $(target) = $(LINKFLAGS) -nostart -Xlinker -soname=\"$(target)\" ;
|
||||
}
|
||||
# make the target depend on the installed libbe libraries
|
||||
Depends $(lib) :
|
||||
<tests!unittests>libbe_haiku.so <tests!unittests>libbeadapter.so ;
|
||||
} else {
|
||||
ObjectDefines $(2) : TEST_R5 ;
|
||||
}
|
||||
|
||||
rule R5TestLib
|
||||
{
|
||||
# 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).
|
||||
UseCppUnitObjectHeaders $(sources) ;
|
||||
|
||||
local target = $(1:B)_r5$(1:S) ;
|
||||
local sources = $(2) ;
|
||||
local dest = $(3) ;
|
||||
local libraries = $(4) ;
|
||||
local objects = [ R5ObjectNames $(sources) ] ;
|
||||
MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ;
|
||||
SharedLibrary $(lib) : $(sources) : $(libraries) libcppunit.so ;
|
||||
|
||||
# Our Main replacement.
|
||||
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) ;
|
||||
Depends unittests : $(lib) ;
|
||||
}
|
||||
|
||||
rule UnitTest
|
||||
{
|
||||
# UnitTest <target> : <sources> : <dest> : <libraries> : <public headers>
|
||||
# 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).
|
||||
|
||||
# UnitTest <target> : <sources> : <libraries> : <resources> ;
|
||||
#
|
||||
local target = $(1) ;
|
||||
local sources = $(2) ;
|
||||
local dest = $(3) ;
|
||||
local libraries = $(4) ;
|
||||
local headerDirs = $(5) ;
|
||||
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
|
||||
local libraries = $(3) ;
|
||||
local resources = $(4) ;
|
||||
|
||||
# Our Main replacement.
|
||||
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) $(dest) ] ;
|
||||
MainFromObjects $(target) : $(objects) ;
|
||||
TestObjects $(sources) : $(headerDirs) ;
|
||||
# define TEST_R5/TEST_HAIKU depending on the platform we build for
|
||||
if $(TARGET_PLATFORM) = libbe_test {
|
||||
ObjectDefines $(2) : TEST_HAIKU TEST_OBOS ;
|
||||
|
||||
Depends $(target) : libcppunit.so ;
|
||||
Depends obostests : $(target) ;
|
||||
LinkAgainst $(target) : libcppunit.so $(libraries) ;
|
||||
}
|
||||
|
||||
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) ;
|
||||
# make the target depend on the installed libbe libraries
|
||||
Depends $(target) :
|
||||
<tests!unittests>libbe_haiku.so <tests!unittests>libbeadapter.so ;
|
||||
} else {
|
||||
ObjectDefines $(2) : TEST_R5 ;
|
||||
}
|
||||
|
||||
# Reset CCFLAGS and C++FLAGS to original values.
|
||||
CCFLAGS = $(oldCCFLAGS) ;
|
||||
C++FLAGS = $(oldC++FLAGS) ;
|
||||
UseCppUnitObjectHeaders $(sources) ;
|
||||
|
||||
MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
|
||||
SimpleTest $(target) : $(sources) : $(libraries) libcppunit.so
|
||||
: $(resources) ;
|
||||
|
||||
Depends unittests : $(lib) ;
|
||||
}
|
||||
|
||||
rule TestObjects
|
||||
{
|
||||
# TestLib <sources> : <public headers> : <r5>
|
||||
# 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.
|
||||
|
||||
# TestObjects <sources> ;
|
||||
#
|
||||
local sources = $(1) ;
|
||||
local headerDirs = $(2) ;
|
||||
local r5 = $(3) ;
|
||||
local objects ;
|
||||
|
||||
if $(r5) {
|
||||
objects = [ R5ObjectNames $(sources) ] ;
|
||||
# define TEST_R5/TEST_HAIKU depending on the platform we build for
|
||||
if $(TARGET_PLATFORM) = libbe_test {
|
||||
ObjectDefines $(2) : TEST_HAIKU TEST_OBOS ;
|
||||
} else {
|
||||
objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
|
||||
ObjectDefines $(2) : TEST_R5 ;
|
||||
}
|
||||
|
||||
# Turn optimization off, if desired.
|
||||
if ! $(NO_TEST_DEBUG) {
|
||||
OPTIM on $(objects) = ;
|
||||
}
|
||||
UseCppUnitObjectHeaders $(sources) ;
|
||||
|
||||
# set headers/defines
|
||||
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 ;
|
||||
Objects $(sources) ;
|
||||
}
|
||||
|
||||
rule SimpleTest
|
||||
@@ -262,7 +96,6 @@ rule SimpleTest
|
||||
rule BuildPlatformTest
|
||||
{
|
||||
# Usage BuildPlatformTest <target> : <sources> ;
|
||||
|
||||
local target = $(1) ;
|
||||
local sources = $(2) ;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
SubDir HAIKU_TOP src kits translation ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
if $(TARGET_PLATFORM) != haiku {
|
||||
UsePublicHeaders translation ;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <ExampleTest.h>
|
||||
#include "ExampleTest.h"
|
||||
|
||||
#include <ThreadedTestCaller.h>
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/TestCaller.h>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <TestSuite.h>
|
||||
#include <TestSuiteAddon.h>
|
||||
#include <ExampleTest.h>
|
||||
|
||||
#include "ExampleTest.h"
|
||||
|
||||
BTestSuite* getTestSuite() {
|
||||
BTestSuite *suite = new BTestSuite("ExampleSuite");
|
||||
|
||||
+15
-24
@@ -1,37 +1,28 @@
|
||||
SubDir HAIKU_TOP src tests ;
|
||||
|
||||
CommonTestLib libexampletest.so
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UnitTestLib libexampletest.so
|
||||
: ExampleTestAddon.cpp
|
||||
ExampleTest.cpp
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
:
|
||||
;
|
||||
|
||||
UnitTest UnitTester
|
||||
: UnitTester.cpp
|
||||
:
|
||||
: be stdc++.r4
|
||||
:
|
||||
: UnitTesterHelper.cpp
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
: UnitTesterHelper.rsrc
|
||||
;
|
||||
|
||||
AddResources UnitTesterHelper : UnitTesterHelper.rsrc ;
|
||||
UnitTest UnitTesterHelper
|
||||
: UnitTesterHelper.cpp
|
||||
: unittester
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
:
|
||||
;
|
||||
|
||||
AddResources UnitTesterHelper_r5 : UnitTesterHelper.rsrc ;
|
||||
R5UnitTest UnitTesterHelper
|
||||
: UnitTesterHelper.cpp
|
||||
: unittester_r5
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
:
|
||||
;
|
||||
# Install libbe and other libraries for target platform libbe_test.
|
||||
if $(TARGET_PLATFORM) = libbe_test {
|
||||
local libs = libbe_haiku.so libbeadapter.so libtranslation.so ;
|
||||
HaikuInstall install-unittest-libs : $(TARGET_UNIT_TEST_LIB_DIR)
|
||||
: $(libs)
|
||||
: tests!unittests ;
|
||||
}
|
||||
|
||||
SubInclude HAIKU_TOP src tests add-ons ;
|
||||
SubInclude HAIKU_TOP src tests apps ;
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
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
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) bmptranslator ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) pngtranslator ] ;
|
||||
@@ -7,15 +12,17 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) stxttranslator ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) tgatranslator ] ;
|
||||
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
|
||||
BMPTranslatorTest.cpp
|
||||
PNGTranslatorTest.cpp
|
||||
STXTTranslatorTest.cpp
|
||||
TGATranslatorTest.cpp
|
||||
TIFFTranslatorTest.cpp
|
||||
: libtranslation.so be stdc++.r4
|
||||
: translation be stdc++.r4
|
||||
:
|
||||
: translation
|
||||
: $(libtranslation) be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include <AllocatorTest.h>
|
||||
#include <ThreadedTestCaller.h>
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/TestCaller.h>
|
||||
@@ -8,6 +7,8 @@
|
||||
#include <kernel/OS.h>
|
||||
#include <TestUtils.h>
|
||||
|
||||
#include "AllocatorTest.h"
|
||||
|
||||
#include "Allocator.h"
|
||||
#include "PhysicalPartitionAllocator.h"
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
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
|
||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems udf ] ;
|
||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src bin makeudfimage ] ;
|
||||
|
||||
TestLib libmakeudfimagetest.so
|
||||
UnitTestLib libmakeudfimagetest.so
|
||||
: MakeudfimageTestAddon.cpp
|
||||
# test files
|
||||
AllocatorTest.cpp
|
||||
@@ -19,9 +23,7 @@ TestLib libmakeudfimagetest.so
|
||||
UdfStructures.cpp
|
||||
Utils.cpp
|
||||
|
||||
: [ FDirName $(HAIKU_TEST_DIR) unittester lib ]
|
||||
: be stdc++.r4
|
||||
:
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles Allocator.cpp PhysicalPartitionAllocator.cpp ]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <TestSuite.h>
|
||||
#include <TestSuiteAddon.h>
|
||||
#include <AllocatorTest.h>
|
||||
|
||||
#include "AllocatorTest.h"
|
||||
|
||||
BTestSuite* getTestSuite() {
|
||||
BTestSuite *suite = new BTestSuite("makeudfimage");
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
SubDir HAIKU_TOP src tests kernel core util ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel util ] ;
|
||||
UsePrivateHeaders [ FDirName kernel ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src tests kits app ] ;
|
||||
|
||||
# Two versions of the test lib are not really needed until
|
||||
# we start linking to Be libraries, but it doesn't hurt...
|
||||
CommonTestLib libkernelutilstest.so
|
||||
UnitTestLib libkernelutilstest.so
|
||||
: KernelUtilsTestAddon.cpp
|
||||
# AVLTreeMapTest.cpp
|
||||
SinglyLinkedListTest.cpp
|
||||
@@ -14,9 +17,6 @@ CommonTestLib libkernelutilstest.so
|
||||
VectorMapTest.cpp
|
||||
VectorSetTest.cpp
|
||||
VectorTest.cpp
|
||||
: stdc++.r4
|
||||
: stdc++.r4
|
||||
:
|
||||
:
|
||||
: $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#include <TestSuite.h>
|
||||
#include <TestSuiteAddon.h>
|
||||
//#include <AVLTreeMapTest.h>
|
||||
#include <SinglyLinkedListTest.h>
|
||||
#include <DoublyLinkedListTest.h>
|
||||
#include <VectorMapTest.h>
|
||||
#include <VectorSetTest.h>
|
||||
#include <VectorTest.h>
|
||||
|
||||
//#include "AVLTreeMapTest.h"
|
||||
#include "SinglyLinkedListTest.h"
|
||||
#include "DoublyLinkedListTest.h"
|
||||
#include "VectorMapTest.h"
|
||||
#include "VectorSetTest.h"
|
||||
#include "VectorTest.h"
|
||||
|
||||
|
||||
BTestSuite* getTestSuite() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include <SinglyLinkedListTest.h>
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/TestCaller.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
#include <stdio.h>
|
||||
#include <TestUtils.h>
|
||||
|
||||
#include "SinglyLinkedListTest.h"
|
||||
#include "SinglyLinkedList.h"
|
||||
|
||||
SinglyLinkedListTest::SinglyLinkedListTest(std::string name)
|
||||
|
||||
+19
-23
@@ -1,5 +1,8 @@
|
||||
SubDir HAIKU_TOP src tests kits app ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UsePrivateHeaders app ;
|
||||
|
||||
# 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) common ] ;
|
||||
|
||||
CommonTestLib libmessagetest.so
|
||||
: MessageTestAddon.cpp
|
||||
MessageTest.cpp
|
||||
MessageConstructTest.cpp
|
||||
MessageDestructTest.cpp
|
||||
MessageOpAssignTest.cpp
|
||||
MessageEasyFindTest.cpp
|
||||
MessageSpeedTest.cpp
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
:
|
||||
: app
|
||||
;
|
||||
# TODO: bonefish: There is no MessageTestAddon.cpp. Remove, if noone uses
|
||||
# this.
|
||||
#UnitTestLib libmessagetest.so
|
||||
# : MessageTestAddon.cpp
|
||||
# MessageTest.cpp
|
||||
# MessageConstructTest.cpp
|
||||
# MessageDestructTest.cpp
|
||||
# MessageOpAssignTest.cpp
|
||||
# MessageEasyFindTest.cpp
|
||||
# MessageSpeedTest.cpp
|
||||
# : be $(TARGET_LIBSTDC++)
|
||||
#;
|
||||
|
||||
CommonTestLib libapptest.so
|
||||
UnitTestLib libapptest.so
|
||||
: AppKitTestAddon.cpp
|
||||
|
||||
# BApplication
|
||||
@@ -151,18 +153,12 @@ CommonTestLib libapptest.so
|
||||
AppRunner.cpp
|
||||
PipedAppRunner.cpp
|
||||
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
:
|
||||
: app support
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
CommonTestLib libappteststub.so
|
||||
UnitTestLib libappteststub.so
|
||||
: AppKitTestStub.cpp
|
||||
: libapptest.so stdc++.r4
|
||||
: libapptest_r5.so stdc++.r4
|
||||
:
|
||||
:
|
||||
: libapptest.so $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
SimpleTest DanoMessageTest :
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
SubDir HAIKU_TOP src tests kits app bapplication testapps ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
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
|
||||
{
|
||||
@@ -17,29 +20,16 @@ rule SimpleBAppTestApp
|
||||
|
||||
rule SimpleBAppTestApp2
|
||||
{
|
||||
# SimpleBAppTestApp <name> : <sources> : <resources> : <use objects> ;
|
||||
# SimpleBAppTestApp2 <name> : <sources> : <resources> : <use objects> ;
|
||||
local name = $(1) ;
|
||||
local sources = $(2) ;
|
||||
local resources = $(3) ;
|
||||
local useObjects = $(4) ;
|
||||
local r5name = $(name)_r5 ;
|
||||
|
||||
local useR5Objects ;
|
||||
local object ;
|
||||
for object in $(useObjects) {
|
||||
useR5Objects += $(object:B=$(object:B)_r5) ;
|
||||
}
|
||||
|
||||
if $(resources) {
|
||||
AddResources $(name) : $(resources) ;
|
||||
AddResources $(r5name) : $(resources) ;
|
||||
}
|
||||
CommonUnitTest $(name)
|
||||
UnitTest $(name)
|
||||
: $(sources)
|
||||
: kits app
|
||||
: be stdc++.r4 $(useObjects)
|
||||
: be stdc++.r4 $(useR5Objects)
|
||||
: app support
|
||||
: be $(TARGET_LIBSTDC++) $(useObjects)
|
||||
: $(resources)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -48,17 +38,11 @@ rule CopyBAppTestApp
|
||||
# CopyBAppTestApp <target> : <source> ;
|
||||
local target = $(1) ;
|
||||
local source = $(2) ;
|
||||
local r5target = $(target)_r5 ;
|
||||
local r5source = $(source)_r5 ;
|
||||
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
|
||||
MakeLocate $(r5target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
|
||||
|
||||
MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
|
||||
File $(target) : $(source) ;
|
||||
File $(r5target) : $(r5source) ;
|
||||
local file ;
|
||||
for file in $(target) $(r5target) {
|
||||
MODE on $(file) = $(EXEMODE) ;
|
||||
MimeSet $(file) ;
|
||||
}
|
||||
MODE on $(target) = $(EXEMODE) ;
|
||||
MimeSet $(target) ;
|
||||
}
|
||||
|
||||
# BApplication::BApplication() test apps
|
||||
|
||||
@@ -12,11 +12,7 @@
|
||||
// Standard Includes -----------------------------------------------------------
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#ifdef TEST_OBOS
|
||||
#include <posix/typeinfo>
|
||||
#else
|
||||
#include <typeinfo>
|
||||
#endif
|
||||
#include <posix/string.h>
|
||||
|
||||
// System Includes -------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
SubDir HAIKU_TOP src tests kits app bmessenger ;
|
||||
|
||||
CommonUnitTest SMRemoteTargetApp
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UnitTest SMRemoteTargetApp
|
||||
: SMRemoteTargetApp.cpp
|
||||
SMLooper.cpp
|
||||
: kits app
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
: app support
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
SubInclude HAIKU_TOP src tests kits app bmessenger testapps ;
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
SubDir HAIKU_TOP src tests kits app bmessenger testapps ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
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
|
||||
{
|
||||
@@ -23,24 +26,11 @@ rule SimpleBMessengerTestApp2
|
||||
local sources = $(2) ;
|
||||
local resources = $(3) ;
|
||||
local useObjects = $(4) ;
|
||||
local r5name = $(name)_r5 ;
|
||||
|
||||
local useR5Objects ;
|
||||
local object ;
|
||||
for object in $(useObjects) {
|
||||
useR5Objects += $(object:B=$(object:B)_r5) ;
|
||||
}
|
||||
|
||||
if $(resources) {
|
||||
AddResources $(name) : $(resources) ;
|
||||
AddResources $(r5name) : $(resources) ;
|
||||
}
|
||||
CommonUnitTest $(name)
|
||||
UnitTest $(name)
|
||||
: $(sources)
|
||||
: kits app
|
||||
: be stdc++.r4 $(useObjects)
|
||||
: be stdc++.r4 $(useR5Objects)
|
||||
: app support
|
||||
: be $(TARGET_LIBSTDC++) $(useObjects)
|
||||
: $(resources)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -49,17 +39,11 @@ rule CopyBMessengerTestApp
|
||||
# CopyBMessengerTestApp <target> : <source> ;
|
||||
local target = $(1) ;
|
||||
local source = $(2) ;
|
||||
local r5target = $(target)_r5 ;
|
||||
local r5source = $(source)_r5 ;
|
||||
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
|
||||
MakeLocate $(r5target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
|
||||
|
||||
MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
|
||||
File $(target) : $(source) ;
|
||||
File $(r5target) : $(r5source) ;
|
||||
local file ;
|
||||
for file in $(target) $(r5target) {
|
||||
MODE on $(file) = $(EXEMODE) ;
|
||||
MimeSet $(file) ;
|
||||
}
|
||||
MODE on $(target) = $(EXEMODE) ;
|
||||
MimeSet $(target) ;
|
||||
}
|
||||
|
||||
# BMessenger::BMessenger() test apps
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
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 broster ] ;
|
||||
|
||||
@@ -25,24 +28,11 @@ rule SimpleBRosterTestApp2
|
||||
local sources = $(2) ;
|
||||
local resources = $(3) ;
|
||||
local useObjects = $(4) ;
|
||||
local r5name = $(name)_r5 ;
|
||||
|
||||
local useR5Objects ;
|
||||
local object ;
|
||||
for object in $(useObjects) {
|
||||
useR5Objects += $(object:B=$(object:B)_r5) ;
|
||||
}
|
||||
|
||||
if $(resources) {
|
||||
AddResources $(name) : $(resources) ;
|
||||
AddResources $(r5name) : $(resources) ;
|
||||
}
|
||||
CommonUnitTest $(name)
|
||||
UnitTest $(name)
|
||||
: $(sources)
|
||||
: kits app
|
||||
: be stdc++.r4 $(useObjects)
|
||||
: be stdc++.r4 $(useR5Objects)
|
||||
: app support
|
||||
: be $(TARGET_LIBSTDC++) $(useObjects)
|
||||
: $(resources)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -51,17 +41,11 @@ rule CopyBRosterTestApp
|
||||
# CopyBRosterTestApp <target> : <source> ;
|
||||
local target = $(1) ;
|
||||
local source = $(2) ;
|
||||
local r5target = $(target)_r5 ;
|
||||
local r5source = $(source)_r5 ;
|
||||
MakeLocate $(target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
|
||||
MakeLocate $(r5target) : [ FDirName $(HAIKU_TEST_DIR) kits app ] ;
|
||||
|
||||
MakeLocate $(target) : $(TARGET_UNIT_TEST_DIR) ;
|
||||
File $(target) : $(source) ;
|
||||
File $(r5target) : $(r5source) ;
|
||||
local file ;
|
||||
for file in $(target) $(r5target) {
|
||||
MODE on $(file) = $(EXEMODE) ;
|
||||
MimeSet $(file) ;
|
||||
}
|
||||
MODE on $(target) = $(EXEMODE) ;
|
||||
MimeSet $(target) ;
|
||||
}
|
||||
|
||||
# BRoster::Launch() test apps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <RecentAppsTestApp.h>
|
||||
#include "RecentAppsTestApp.h"
|
||||
|
||||
int main() {
|
||||
RecentAppsTestApp app(kRecentAppsTestAppSigs[kControlApp]);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <RecentAppsTestApp.h>
|
||||
#include "RecentAppsTestApp.h"
|
||||
|
||||
int main() {
|
||||
RecentAppsTestApp app(kRecentAppsTestAppSigs[kEmptyApp]);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <RecentAppsTestApp.h>
|
||||
#include "RecentAppsTestApp.h"
|
||||
|
||||
int main() {
|
||||
RecentAppsTestApp app(kRecentAppsTestAppSigs[kNonQualifyingApp]);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <RecentAppsTestApp.h>
|
||||
#include "RecentAppsTestApp.h"
|
||||
|
||||
int main() {
|
||||
RecentAppsTestApp app(kRecentAppsTestAppSigs[kQualifyingApp]);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
SubDir HAIKU_TOP src tests kits app common ;
|
||||
|
||||
TestObjects CommonTestApp.cpp : app support ;
|
||||
TestObjects CommonTestApp.cpp : : true ;
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
TestObjects CommonTestApp.cpp ;
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
SubDir HAIKU_TOP src tests kits interface ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UsePrivateHeaders interface ;
|
||||
|
||||
# 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 ] ;
|
||||
|
||||
CommonTestLib libinterfacetest.so
|
||||
UnitTestLib libinterfacetest.so
|
||||
: InterfaceKitTestAddon.cpp
|
||||
|
||||
GraphicsDefsTest.cpp
|
||||
@@ -50,10 +53,7 @@ CommonTestLib libinterfacetest.so
|
||||
WidthBufferTest.cpp
|
||||
WidthBufferSimpleTest.cpp
|
||||
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
:
|
||||
: app support
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
ObjectDefines
|
||||
|
||||
@@ -20,6 +20,7 @@ const char *k40X = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
|
||||
const char *k60X = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
|
||||
|
||||
// Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color)
|
||||
#if TEST_R5
|
||||
bool operator==(const rgb_color &left, const rgb_color &right)
|
||||
{
|
||||
if (left.red == right.red && left.green == right.green &&
|
||||
@@ -28,6 +29,8 @@ bool operator==(const rgb_color &left, const rgb_color &right)
|
||||
else
|
||||
return false;
|
||||
}
|
||||
#endif // TEST_R5
|
||||
|
||||
// Required by CPPUNIT_ASSERT_EQUAL(rgb_color, rgb_color)
|
||||
ostream &operator<<(ostream &stream, const rgb_color &clr)
|
||||
{
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#ifndef APP_FILE_INFO_TEST_H
|
||||
#define APP_FILE_INFO_TEST_H
|
||||
|
||||
#include "BasicTest.h"
|
||||
|
||||
#include <StorageDefs.h>
|
||||
#include <SupportDefs.h>
|
||||
#include <BasicTest.h>
|
||||
|
||||
class BApplication;
|
||||
class BBitmap;
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
#include <cppunit/TestCaller.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
|
||||
#include <EntryTest.h>
|
||||
|
||||
#include <Entry.h>
|
||||
#include <Directory.h>
|
||||
#include <Path.h>
|
||||
|
||||
#include "EntryTest.h"
|
||||
|
||||
enum test_entry_kind {
|
||||
DIR_ENTRY,
|
||||
FILE_ENTRY,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
SubDir HAIKU_TOP src tests kits storage ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UsePrivateHeaders storage ;
|
||||
|
||||
CommonTestLib libstoragetest.so
|
||||
UnitTestLib libstoragetest.so
|
||||
: StorageKitTestAddon.cpp
|
||||
AppFileInfoTest.cpp
|
||||
BasicTest.cpp
|
||||
@@ -22,24 +25,15 @@ CommonTestLib libstoragetest.so
|
||||
SymLinkTest.cpp
|
||||
TestApp.cpp
|
||||
VolumeTest.cpp
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
:
|
||||
: storage
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
# To run the tests some test files must be around.
|
||||
{
|
||||
# OBOS
|
||||
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 ;
|
||||
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) ;
|
||||
Depends libstoragetest.so : $(resdir) ;
|
||||
}
|
||||
|
||||
SubInclude HAIKU_TOP src tests kits storage disk_device ;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// MimeSnifferTest.cpp
|
||||
|
||||
#include <MimeSnifferTest.h>
|
||||
#include "MimeSnifferTest.h"
|
||||
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
#include <cppunit/TestCaller.h>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#if !TEST_R5
|
||||
#include <mime/database_support.h>
|
||||
#endif
|
||||
#include <MimeTypeTest.h>
|
||||
#include <Path.h> // Only needed for entry_ref dumps
|
||||
#include <StorageKit.h>
|
||||
#include <String.h>
|
||||
@@ -32,6 +31,8 @@
|
||||
#include "TestApp.h"
|
||||
#include "TestUtils.h"
|
||||
|
||||
#include "MimeTypeTest.h"
|
||||
|
||||
// MIME database directories
|
||||
static const char *testDir = "/tmp/mimeTestDir";
|
||||
static const char *R5DatabaseDir = "/boot/home/config/settings/beos_mime";
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#ifndef NODE_INFO_TEST_H
|
||||
#define NODE_INFO_TEST_H
|
||||
|
||||
#include "BasicTest.h"
|
||||
|
||||
#include <StorageDefs.h>
|
||||
#include <SupportDefs.h>
|
||||
#include <BasicTest.h>
|
||||
|
||||
class BApplication;
|
||||
class BBitmap;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <cppunit/TestCaller.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
#include <TestUtils.h>
|
||||
#include <NodeTest.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fs_attr.h> // For struct attr_info
|
||||
@@ -19,6 +18,8 @@
|
||||
#include <String.h>
|
||||
#include <TypeConstants.h>
|
||||
|
||||
#include "NodeTest.h"
|
||||
|
||||
|
||||
// == for attr_info
|
||||
static
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// PathTest.cpp
|
||||
#include <PathTest.h>
|
||||
//#include "StorageKitTester.h"
|
||||
#include "PathTest.h"
|
||||
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/TestCaller.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#ifndef __sk_path_test_h__
|
||||
#define __sk_path_test_h__
|
||||
|
||||
#include "BasicTest.h"
|
||||
|
||||
#include <StorageDefs.h>
|
||||
#include <SupportDefs.h>
|
||||
#include <BasicTest.h>
|
||||
|
||||
class CppUnit::Test;
|
||||
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include <ResourceStringsTest.h>
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <Entry.h>
|
||||
#include <File.h>
|
||||
@@ -19,6 +16,7 @@
|
||||
#include <TypeConstants.h>
|
||||
#include <TestShell.h>
|
||||
|
||||
#include "ResourceStringsTest.h"
|
||||
|
||||
static const char *testDir = "/tmp/testDir";
|
||||
static const char *x86ResFile = "/tmp/testDir/x86.rsrc";
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include <ResourcesTest.h>
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <File.h>
|
||||
#include <Mime.h>
|
||||
@@ -16,6 +13,7 @@
|
||||
#include <TypeConstants.h>
|
||||
#include <TestShell.h>
|
||||
|
||||
#include "ResourcesTest.h"
|
||||
|
||||
static const char *testDir = "/tmp/testDir";
|
||||
static const char *x86ResFile = "/tmp/testDir/x86.rsrc";
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#ifndef VOLUME_TEST_H
|
||||
#define VOLUME_TEST_H
|
||||
|
||||
#include "BasicTest.h"
|
||||
|
||||
#include <StorageDefs.h>
|
||||
#include <SupportDefs.h>
|
||||
#include <BasicTest.h>
|
||||
|
||||
class BTestApp;
|
||||
class BBitmap;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
SubDir HAIKU_TOP src tests kits storage testapps ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
SimpleTest <test>clipboard : clipboard.cpp : be net ;
|
||||
SimpleTest dump_mime_types : dump_mime_types.cpp : be net ;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
SubDir HAIKU_TOP src tests kits support ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
# Let Jam know where to find some of our source files
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) barchivable ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) bautolock ] ;
|
||||
@@ -8,7 +11,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) bmemoryio ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) bstring ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) bblockcache ] ;
|
||||
|
||||
CommonTestLib libsupporttest.so
|
||||
UnitTestLib libsupporttest.so
|
||||
: SupportKitTestAddon.cpp
|
||||
|
||||
ByteOrderTest.cpp
|
||||
@@ -74,10 +77,7 @@ CommonTestLib libsupporttest.so
|
||||
BlockCacheExerciseTest.cpp
|
||||
BlockCacheConcurrencyTest.cpp
|
||||
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
: libsupporttest_RemoteTestObject.so
|
||||
: support
|
||||
: be $(TARGET_LIBSTDC++) libsupporttest_RemoteTestObject.so
|
||||
;
|
||||
|
||||
SubInclude HAIKU_TOP src tests kits support barchivable ;
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
SubDir HAIKU_TOP src tests kits support barchivable remoteobjectdef ;
|
||||
|
||||
# Add the libraries' resource files. If this sort of thing is needed
|
||||
# anywhere else, we ought to make it into a real rule.
|
||||
AddResources libsupporttest_RemoteTestObject.so : RemoteTestObject.rdef ;
|
||||
AddResources libsupporttest_RemoteTestObject_r5.so : RemoteTestObject.rdef ;
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
CommonTestLib libsupporttest_RemoteTestObject.so
|
||||
UnitTestLib libsupporttest_RemoteTestObject.so
|
||||
: RemoteTestObject.cpp
|
||||
: be stdc++.r4
|
||||
: be stdc++.r4
|
||||
:
|
||||
: support
|
||||
: be $(LIBSTDC++)
|
||||
: RemoteTestObject.rdef
|
||||
;
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
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
|
||||
TranslatorRosterTest.cpp
|
||||
BitmapStreamTest.cpp
|
||||
TranslationUtilsTest.cpp
|
||||
TranslatorTest.cpp
|
||||
: libtranslation.so be stdc++.r4
|
||||
: translation be stdc++.r4
|
||||
:
|
||||
: translation
|
||||
: $(libtranslation) be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
+13
-23
@@ -1,34 +1,28 @@
|
||||
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 ] ;
|
||||
|
||||
rule CppUnitLibrary
|
||||
{
|
||||
# CppUnitLibrary <sources> ;
|
||||
local _lib = libcppunit.so ;
|
||||
DEFINES += BUILDING_CPPUNIT ;
|
||||
|
||||
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
|
||||
TestApp.cpp
|
||||
TestCase.cpp
|
||||
TestListener.cpp
|
||||
TestShell.cpp
|
||||
TestSuite.cpp
|
||||
TestUtils.cpp
|
||||
ThreadedTestCase.cpp
|
||||
|
||||
@@ -55,13 +49,9 @@ CppUnitLibrary
|
||||
TextTestResult.cpp
|
||||
TypeInfoHelper.cpp
|
||||
XmlOutputter.cpp
|
||||
: be $(TARGET_LIBSTDC++)
|
||||
;
|
||||
|
||||
LinkAgainst libcppunit.so :
|
||||
stdc++.r4 # is called `mslcpp_4_0' on PPC -- just create a symlink
|
||||
be
|
||||
;
|
||||
|
||||
if $(OS) != BEOS || $(OSPLAT) != PPC {
|
||||
if $(OS) = BEOS && $(OSPLAT) != PPC {
|
||||
LinkAgainst libcppunit.so : libelfsymbolpatcher.a ;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
SubDir HAIKU_TOP src tools elfsymbolpatcher ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) headers tools elfsymbolpatcher ] ;
|
||||
|
||||
StaticLibrary libelfsymbolpatcher.a
|
||||
|
||||
Reference in New Issue
Block a user