SubDir OBOS_TOP src tests kits storage ;

#		EntryTest.cpp
#		FileTest.cpp
#		FindDirectoryTest.cpp
#		MimeTypeTest.cpp
#		PathTest.cpp
#		QueryTest.cpp
#		ResourcesTest.cpp
#		ResourceStringsTest.cpp
#		StatableTest.cpp
#		SymLinkTest.cpp
#		TestApp.cpp

CommonTestLib libstoragetest.so
	: StorageKitTestAddon.cpp
		BasicTest.cpp
		DirectoryTest.cpp
		NodeTest.cpp
		PathTest.cpp
		StatableTest.cpp
		TestUtils.cpp
	: libstorage.so be stdc++.r4
	: be stdc++.r4
	: storage
;

# To run the tests the libraries must be around.
{
	local libdir = [ on UnitTester FDirName $(LOCATE[1]) lib ] ;
	MakeLocate <$(SOURCE_GRIST)>libstorage.so : $(libdir) ;
	MakeLocate <$(SOURCE_GRIST)>libbeadapter.so : $(libdir) ;
	RelSymLink <$(SOURCE_GRIST)>libstorage.so : libstorage.so ;
	RelSymLink <$(SOURCE_GRIST)>libbeadapter.so : libbeadapter.so ;
	DEPENDS libstoragetest.so 
		: <$(SOURCE_GRIST)>libstorage.so <$(SOURCE_GRIST)>libbeadapter.so ;
}

# To run the tests some test files must be around.
{
	local resdir = <storage!kit!test!files>resources ;
	MakeLocate $(resdir) : [ on libstoragetest.so return $(LOCATE[1]) ] ;
	RelSymLink $(resdir) : [ FDirName $(SUBDIR) resources ] ;
	DEPENDS libstoragetest.so : $(resdir) ;
}

