unittests: copy dependencies of test addons

Change-Id: I62471381623c2e34a07901295f4813501e4688f8
This commit is contained in:
Kacper Kasper
2026-04-07 15:18:16 +02:00
parent a127ad48e6
commit 9b7512d459
3 changed files with 15 additions and 3 deletions
+13 -2
View File
@@ -9,11 +9,13 @@ rule UnitTestDependency
rule UnitTestLib rule UnitTestLib
{ {
# UnitTestLib <lib> : <sources> : <libraries> ; # UnitTestLib <lib> : <sources> : <libraries> : <local_libraries> : <rdefs> ;
# #
local lib = $(1) ; local lib = $(1) ;
local sources = $(2) ; local sources = $(2) ;
local libraries = $(3) ; local libraries = $(3) ;
local local_libraries = $(4) ;
local rdefs = $(5) ;
# if TEST_DEBUG is defined, we turn on debugging # if TEST_DEBUG is defined, we turn on debugging
if $(TEST_DEBUG) { if $(TEST_DEBUG) {
@@ -34,10 +36,19 @@ rule UnitTestLib
UseCppUnitObjectHeaders $(sources) ; UseCppUnitObjectHeaders $(sources) ;
MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ; MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ;
SharedLibrary $(lib) : $(sources) : $(libraries) libcppunit.so ; SharedLibrary $(lib) : $(sources) : $(libraries) $(local_libraries) libcppunit.so : $(rdefs) ;
UnitTestDependency $(lib) ; UnitTestDependency $(lib) ;
UNIT_TEST_LIBRARIES on unittests += $(lib) ; UNIT_TEST_LIBRARIES on unittests += $(lib) ;
UNIT_TEST_LIBRARIES on unittests += $(local_libraries) ;
for dep in $(local_libraries) {
local dep_grist = $(dep:G=unittests) ;
MakeLocate $(dep_grist) : [ FDirName $(TARGET_UNIT_TEST_DIR) lib ] ;
File $(dep_grist) : $(dep) ;
MimeSet $(dep_grist) ;
MODE on $(dep_grist) = $(EXEMODE) ;
UnitTestDependency $(dep_grist) ;
}
} }
@@ -5,5 +5,6 @@ AddSubDirSupportedPlatforms libbe_test ;
UnitTestLib libsupporttest_RemoteTestObject.so UnitTestLib libsupporttest_RemoteTestObject.so
: RemoteTestObject.cpp : RemoteTestObject.cpp
: be [ TargetLibstdc++ ] : be [ TargetLibstdc++ ]
:
: RemoteTestObject.rdef : RemoteTestObject.rdef
; ;
@@ -45,7 +45,7 @@ StaticLibrary test_disk_device_manager.a :
UnitTestLib libkerneldiskdevicemanagertest.so : UnitTestLib libkerneldiskdevicemanagertest.so :
DiskDeviceManagerTestAddon.cpp DiskDeviceManagerTestAddon.cpp
KPartitionTest.cpp KPartitionTest.cpp
: be [ TargetLibsupc++ ] [ TargetLibstdc++ ] test_disk_device_manager.a libkernelland_emu.so : be [ TargetLibsupc++ ] [ TargetLibstdc++ ] test_disk_device_manager.a : libkernelland_emu.so
; ;
SimpleTest DiskDeviceManagerTest : SimpleTest DiskDeviceManagerTest :