Implement 'make test'
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
2005-05-20 14:55:15 UTC (rev 15433)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
2005-05-20 15:12:32 UTC (rev 15434)
@@ -308,6 +308,7 @@
GenerateXmlBuildFilesMacro ();
ProcessModules ();
GenerateInstallTarget ();
+ GenerateTestTarget ();
GenerateDirectoryTargets ();
GenerateDirectories ();
UnpackWineResources ();
@@ -950,6 +951,32 @@
}
void
+MingwBackend::GetModuleTestTargets (
+ vector<string>& out ) const
+{
+ for ( size_t i = 0; i < ProjectNode.modules.size (); i++ )
+ {
+ const Module& module = *ProjectNode.modules[i];
+ if ( module.type == Test )
+ out.push_back ( module.name );
+ }
+}
+
+void
+MingwBackend::GenerateTestTarget ()
+{
+ vector<string> vTestTargets;
+ GetModuleTestTargets ( vTestTargets );
+ string testTargets = v2s ( vTestTargets, 5 );
+
+ fprintf ( fMakefile,
+ "test: %s\n",
+ testTargets.c_str () );
+ fprintf ( fMakefile,
+ "\n" );
+}
+
+void
MingwBackend::GenerateDirectoryTargets ()
{
intermediateDirectory->CreateRule ( fMakefile, "" );
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
2005-05-20 14:55:15 UTC (rev 15433)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
2005-05-20 15:12:32 UTC (rev 15434)
@@ -105,6 +105,8 @@
std::string GetRegistryTargetFiles ();
void OutputRegistryInstallTarget ();
void GenerateInstallTarget ();
+ void GetModuleTestTargets ( std::vector<std::string>& out )
const;
+ void GenerateTestTarget ();
void GenerateDirectoryTargets ();
FILE* fMakefile;
bool use_pch;
Show replies by date