SubDir HAIKU_TOP src tests kits storage ;

AddSubDirSupportedPlatforms libbe_test ;

UsePrivateHeaders storage ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits storage ] ;

UnitTestLib libstoragetest.so
	: StorageKitTestAddon.cpp
		AppFileInfoTest.cpp
		BasicTest.cpp
		DataIOTest.cpp
		DirectoryTest.cpp
		EntryTest.cpp
		FindDirectoryTest.cpp
		FileTest.cpp
		MimeSnifferTest.cpp
		# MimeTypeTest.cpp
		NodeInfoTest.cpp
		NodeTest.cpp
		PathTest.cpp
		QueryTest.cpp
		ResourcesTest.cpp
		ResourceStringsTest.cpp
		StatableTest.cpp
		SymLinkTest.cpp
		TestApp.cpp
		VolumeTest.cpp
	: be [ TargetLibstdc++ ]
;

# To run the tests some test files must be around.
{
	local sourceDir = [ FDirName resources ] ;
	local destDir = [ FDirName kits storage ] ;
	local execs = elf elf-no-res pef pef-no-res ;
	local rsrcs = ppc.rsrc x86.rsrc ;
	UnitTestResources $(execs:D=$(sourceDir)) : $(destDir) : isExec ;
	UnitTestResources $(rsrcs:D=$(sourceDir)) : $(destDir) ;
}

SubInclude HAIKU_TOP src tests kits storage disk_device ;
SubInclude HAIKU_TOP src tests kits storage testapps ;
SubInclude HAIKU_TOP src tests kits storage virtualdrive ;
