Support for copying non-generated files to cd Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h Added: branches/xmlbuildsystem/reactos/tools/rbuild/cdfile.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/makefile Modified: branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.txt Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp Added: branches/xmlbuildsystem/reactos/tools/rbuild/tests/cdfiletest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy.xml Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy_include.xml Added: branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/cdfile.xml Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/definetest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/iftest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/includetest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/invoketest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/linkerflagtest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -1970,9 +1970,25 @@
} }
+void +MingwIsoModuleHandler::OutputCdfileCopyCommands ( const string bootcdDirectory, + const Module& module ) const +{ + for ( size_t i = 0; i < module.project.cdfiles.size (); i++ ) + { + const CDFile& cdfile = *module.project.cdfiles[i]; + string targetFilenameNoFixup = bootcdDirectory + SSEP + cdfile.base + SSEP + cdfile.nameoncd; + string targetFilename = PassThruCacheDirectory ( FixupTargetFilename ( targetFilenameNoFixup ) ); + fprintf ( fMakefile, + "\t${cp} %s %s\n", + cdfile.GetPath ().c_str (), + targetFilename.c_str () ); + } +} + string -MingwIsoModuleHandler::GetCdDirectories ( const string bootcdDirectory, - const Module& module ) const +MingwIsoModuleHandler::GetBootstrapCdDirectories ( const string bootcdDirectory, + const Module& module ) const { string directories; for ( size_t i = 0; i < module.project.modules.size (); i++ ) @@ -1990,23 +2006,76 @@ }
string -MingwIsoModuleHandler::GetCdFiles ( const string bootcdDirectory, - const Module& module ) const +MingwIsoModuleHandler::GetNonModuleCdDirectories ( const string bootcdDirectory, + const Module& module ) const { - string files; + string directories; + for ( size_t i = 0; i < module.project.cdfiles.size (); i++ ) + { + const CDFile& cdfile = *module.project.cdfiles[i]; + string targetDirecctory = bootcdDirectory + SSEP + cdfile.base; + if ( directories.size () > 0 ) + directories += " "; + directories += FixupTargetFilename ( targetDirecctory ); + } + return directories; +} + +string +MingwIsoModuleHandler::GetCdDirectories ( const string bootcdDirectory, + const Module& module ) const +{ + string directories = GetBootstrapCdDirectories ( bootcdDirectory, + module ); + directories += " " + GetNonModuleCdDirectories ( bootcdDirectory, + module ); + return directories; +} + +string +MingwIsoModuleHandler::GetBootstrapCdFiles ( const string bootcdDirectory, + const Module& module ) const +{ + string cdfiles; for ( size_t i = 0; i < module.project.modules.size (); i++ ) { const Module& m = *module.project.modules[i]; if ( m.bootstrap != NULL ) { - if ( files.size () > 0 ) - files += " "; - files += FixupTargetFilename ( m.GetPath () ); + if ( cdfiles.size () > 0 ) + cdfiles += " "; + cdfiles += FixupTargetFilename ( m.GetPath () ); } } - return files; + return cdfiles; }
+string +MingwIsoModuleHandler::GetNonModuleCdFiles ( const string bootcdDirectory, + const Module& module ) const +{ + string cdfiles; + for ( size_t i = 0; i < module.project.cdfiles.size (); i++ ) + { + const CDFile& cdfile = *module.project.cdfiles[i]; + if ( cdfiles.size () > 0 ) + cdfiles += " "; + cdfiles += NormalizeFilename ( cdfile.GetPath () ); + } + return cdfiles; +} + +string +MingwIsoModuleHandler::GetCdFiles ( const string bootcdDirectory, + const Module& module ) const +{ + string cdfiles = GetBootstrapCdFiles ( bootcdDirectory, + module ); + cdfiles += " " + GetNonModuleCdFiles ( bootcdDirectory, + module ); + return cdfiles; +} + void MingwIsoModuleHandler::GenerateIsoModuleTarget ( const Module& module ) { @@ -2044,6 +2113,8 @@ reactosInf.c_str () ); OutputBootstrapfileCopyCommands ( bootcdDirectory, module ); + OutputCdfileCopyCommands ( bootcdDirectory, + module ); fprintf ( fMakefile, "\t${cdmake} -v -m -b %s %s REACTOS ReactOS.iso\n", isoboot.c_str (), _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-03-03 21:00:30 UTC (rev 13807) @@ -291,12 +291,22 @@
virtual void Process ( const Module& module ); private: void GenerateIsoModuleTarget ( const Module& module ); + std::string GetBootstrapCdDirectories ( const std::string bootcdDirectory, + const Module& module ) const; + std::string GetNonModuleCdDirectories ( const std::string bootcdDirectory, + const Module& module ) const; std::string GetCdDirectories ( const std::string bootcdDirectory, const Module& module ) const; + std::string GetBootstrapCdFiles ( const std::string bootcdDirectory, + const Module& module ) const; + std::string GetNonModuleCdFiles ( const std::string bootcdDirectory, + const Module& module ) const; std::string GetCdFiles ( const std::string bootcdDirectory, const Module& module ) const; void OutputBootstrapfileCopyCommands ( const std::string bootcdDirectory, const Module& module ) const; + void OutputCdfileCopyCommands ( const std::string bootcdDirectory, + const Module& module ) const; };
#endif /* MINGW_MODULEHANDLER_H */ _____
Added: branches/xmlbuildsystem/reactos/tools/rbuild/cdfile.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/cdfile.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/cdfile.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -0,0 +1,42 @@
+#include "pch.h" +#include <assert.h> + +#include "rbuild.h" + +using std::string; + +CDFile::CDFile ( const Project& project_, + const XMLElement& cdfileNode, + const string& path ) + : project ( project_ ), + node ( cdfileNode ) +{ + const XMLAttribute* att = node.GetAttribute ( "base", false ); + if ( att != NULL ) + base = att->value; + else + base = ""; + + att = node.GetAttribute ( "nameoncd", false ); + if ( att != NULL ) + nameoncd = att->value; + else + nameoncd = node.value; + name = node.value; + this->path = path; +} + +CDFile::~CDFile () +{ +} + +string +CDFile::GetPath () const +{ + return path + SSEP + name; +} + +void +CDFile::ProcessXML() +{ +} _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/makefile --- branches/xmlbuildsystem/reactos/tools/rbuild/makefile 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/makefile 2005-03-03 21:00:30 UTC (rev 13807) @@ -22,6 +22,7 @@
$(RBUILD_BACKEND_BASE_SOURCES) \ automaticdependency.cpp \ bootstrap.cpp \ + cdfile.cpp \ compilerflag.cpp \ define.cpp \ exception.cpp \ @@ -61,7 +62,8 @@ tests$(SEP)linkerflagtest.cpp \ tests$(SEP)moduletest.cpp \ tests$(SEP)projecttest.cpp \ - tests$(SEP)sourcefiletest.cpp + tests$(SEP)sourcefiletest.cpp \ + tests$(SEP)cdfiletest.cpp
RBUILD_TEST_SPECIAL_SOURCES = \ $(addprefix $(RBUILD_BASE)$(SEP), $(RBUILD_TESTS)) \ _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -30,6 +30,8 @@
delete properties[i]; for ( i = 0; i < ifs.size (); i++ ) delete ifs[i]; + for ( i = 0; i < cdfiles.size (); i++ ) + delete cdfiles[i]; delete head; }
@@ -216,26 +218,28 @@ makefile = att->value;
size_t i; - for ( i = 0; i < node->subElements.size(); i++ ) + for ( i = 0; i < node->subElements.size (); i++ ) ProcessXMLSubElement ( *node->subElements[i], path ); - for ( i = 0; i < modules.size(); i++ ) - modules[i]->ProcessXML(); - for ( i = 0; i < includes.size(); i++ ) - includes[i]->ProcessXML(); - for ( i = 0; i < defines.size(); i++ ) - defines[i]->ProcessXML(); - for ( i = 0; i < linkerFlags.size(); i++ ) - linkerFlags[i]->ProcessXML(); + for ( i = 0; i < modules.size (); i++ ) + modules[i]->ProcessXML (); + for ( i = 0; i < includes.size (); i++ ) + includes[i]->ProcessXML (); + for ( i = 0; i < defines.size (); i++ ) + defines[i]->ProcessXML (); + for ( i = 0; i < linkerFlags.size (); i++ ) + linkerFlags[i]->ProcessXML (); for ( i = 0; i < properties.size(); i++ ) - properties[i]->ProcessXML(); - for ( i = 0; i < ifs.size(); i++ ) - ifs[i]->ProcessXML(); + properties[i]->ProcessXML (); + for ( i = 0; i < ifs.size (); i++ ) + ifs[i]->ProcessXML (); + for ( i = 0; i < cdfiles.size (); i++ ) + ifs[i]->ProcessXML (); }
void Project::ProcessXMLSubElement ( const XMLElement& e, const string& path, - If* pIf /*= NULL*/ ) + If* pIf ) { bool subs_invalid = false; string subpath(path); @@ -255,6 +259,12 @@ modules.push_back ( module ); return; // defer processing until later } + else if ( e.name == "cdfile" ) + { + CDFile* cdfile = new CDFile ( *this, e, path ); + cdfiles.push_back ( cdfile ); + subs_invalid = true; + } else if ( e.name == "directory" ) { const XMLAttribute* att = e.GetAttribute ( "name", true ); _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-03-03 21:00:30 UTC (rev 13807) @@ -52,6 +52,7 @@
class Property; class AutomaticDependency; class Bootstrap; +class CDFile;
class SourceFileTest;
@@ -68,6 +69,7 @@ std::vector<LinkerFlag*> linkerFlags; std::vector<Property*> properties; std::vector<If*> ifs; + std::vector<CDFile*> cdfiles;
Project ( const std::string& filename ); ~Project (); @@ -472,6 +474,25 @@ };
+class CDFile +{ +public: + const Project& project; + const XMLElement& node; + std::string name; + std::string base; + std::string nameoncd; + std::string path; + + CDFile ( const Project& project, + const XMLElement& bootstrapNode, + const std::string& path ); + ~CDFile (); + void ProcessXML(); + std::string GetPath () const; +}; + + extern std::string FixSeparator ( const std::string& s );
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.txt --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.txt 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.txt 2005-03-03 21:00:30 UTC (rev 13807) @@ -161,6 +161,24 @@
None.
+CDFile element +-------------- +A cdfile element specifies the name of a file that is to be put on the bootable CD. + +Syntax: + <cdfile base="reactos" nameoncd="ReadMe.txt">ReadMe.txt</cdfile> + +Attributes: + base - Put file in this directory on the bootable CD. This attribute is optional. + nameoncd - Name of file on the bootable CD. This attribute is optional. + +Value: + Name of file. + +Elements: + None. + + Define element -------------- A define element specifies the name and (optionally) value of a define for the C/C++ compiler and resource compiler. @@ -211,7 +229,7 @@ None.
Elements: - directory, file, if, property. + cdfile, directory, file, if, property.
File element _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h --- branches/xmlbuildsystem/reactos/tools/rbuild/test.h 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/test.h 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,6 +4,8 @@
#include "rbuild.h" #include "backend/mingw/mingw.h"
+#define RBUILD_BASE "tools" SSEP "rbuild" SSEP + class BaseTest { public: @@ -117,4 +119,11 @@
};
+ +class CDFileTest : public BaseTest +{ +public: + void Run (); +}; + #endif /* __TEST_H */ _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -178,6 +178,7 @@
tests.push_back(new IfTest()); tests.push_back(new FunctionTest()); tests.push_back(new SourceFileTest()); + tests.push_back(new CDFileTest()); } };
_____
Added: branches/xmlbuildsystem/reactos/tools/rbuild/tests/cdfiletest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/cdfiletest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/cdfiletest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -0,0 +1,22 @@
+#include "test.h" + +using std::string; + +void CDFileTest::Run() +{ + string projectFilename ( RBUILD_BASE "tests/data/cdfile.xml" ); + Project project( projectFilename ); + ARE_EQUAL ( 3, project.cdfiles.size () ); + + CDFile& cdfile1 = *project.cdfiles[0]; + ARE_EQUAL("dir1", cdfile1.base); + ARE_EQUAL("ReadMe1.txt", cdfile1.nameoncd); + + CDFile& cdfile2 = *project.cdfiles[1]; + ARE_EQUAL("dir2", cdfile2.base); + ARE_EQUAL("readme2.txt", cdfile2.nameoncd); + + CDFile& cdfile3 = *project.cdfiles[2]; + //ARE_EQUAL("", cdfile3.base); + ARE_EQUAL("readme3.txt", cdfile3.nameoncd); +} _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy.xml --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy.xml 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy.xml 2005-03-03 21:00:30 UTC (rev 13807) @@ -1,11 +1,15 @@
<?xml version="1.0" ?> <project name="Project" makefile="Makefile"> - <directory name="tests"> - <directory name="data"> - <module name="module1" type="buildtool"> - <include base="module1">.</include> - <file>sourcefile1.c</file> - </module> + <directory name="tools"> + <directory name="rbuild"> + <directory name="tests"> + <directory name="data"> + <module name="module1" type="buildtool"> + <include base="module1">.</include> + <file>sourcefile1.c</file> + </module> + </directory> + </directory> </directory> </directory> </project> _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy_include.xml --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy_include.xml 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/automaticdepende ncy_include.xml 2005-03-03 21:00:30 UTC (rev 13807) @@ -1,12 +1,16 @@
<?xml version="1.0" ?> <project name="Project" makefile="Makefile"> - <directory name="tests"> - <directory name="data"> - <module name="module1" type="buildtool"> - <include base="module1">.</include> - <include base="module1">sourcefile1</include> - <file>sourcefile_include.c</file> - </module> + <directory name="tools"> + <directory name="rbuild"> + <directory name="tests"> + <directory name="data"> + <module name="module1" type="buildtool"> + <include base="module1">.</include> + <include base="module1">sourcefile1</include> + <file>sourcefile_include.c</file> + </module> + </directory> + </directory> </directory> </directory> </project> _____
Added: branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/cdfile.xml --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/cdfile.xml 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/data/cdfile.xml 2005-03-03 21:00:30 UTC (rev 13807) @@ -0,0 +1,8 @@
+<?xml version="1.0" ?> +<project name="Project" makefile="Makefile"> + <directory name="dir1"> + <cdfile base="dir1" nameoncd="ReadMe1.txt">readme1.txt</cdfile> + <cdfile base="dir2">readme2.txt</cdfile> + <cdfile>readme3.txt</cdfile> + </directory> +</project> _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/definetest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/definetest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/definetest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,7 +4,7 @@
void DefineTest::Run() { - string projectFilename ( "tests/data/define.xml" ); + string projectFilename ( RBUILD_BASE "tests/data/define.xml" ); Project project ( projectFilename ); ARE_EQUAL(1, project.defines.size()); Define& define1 = *project.defines[0]; _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/iftest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/iftest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/iftest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,7 +4,7 @@
void IfTest::Run() { - string projectFilename ( "tests/data/if.xml" ); + string projectFilename ( RBUILD_BASE "tests/data/if.xml" ); Project project ( projectFilename );
ARE_EQUAL ( 1, project.modules.size () ); _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/includetest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/includetest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/includetest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,7 +4,7 @@
void IncludeTest::Run() { - string projectFilename ( "tests/data/include.xml" ); + string projectFilename ( RBUILD_BASE "tests/data/include.xml" ); Project project ( projectFilename ); ARE_EQUAL(1, project.includes.size()); Include& include1 = *project.includes[0]; _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/invoketest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/invoketest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/invoketest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,7 +4,7 @@
void InvokeTest::Run() { - string projectFilename ( "tests/data/invoke.xml" ); + string projectFilename ( RBUILD_BASE "tests/data/invoke.xml" ); Project project ( projectFilename ); ARE_EQUAL(1, project.modules.size());
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/linkerflagtest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/linkerflagtest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/linkerflagtest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,7 +4,7 @@
void LinkerFlagTest::Run() { - string projectFilename ( "tests/data/linkerflag.xml" ); + string projectFilename ( RBUILD_BASE "tests/data/linkerflag.xml" ); Project project ( projectFilename ); ARE_EQUAL(1, project.linkerFlags.size()); LinkerFlag& linkerFlag1 = *project.linkerFlags[0]; _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,7 +4,7 @@
void ModuleTest::Run() { - string projectFilename ( "tests/data/module.xml" ); + string projectFilename ( RBUILD_BASE "tests/data/module.xml" ); Project project ( projectFilename ); ARE_EQUAL(2, project.modules.size());
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -4,7 +4,7 @@
void ProjectTest::Run() { - string projectFilename ( "tests/data/project.xml" ); + string projectFilename ( RBUILD_BASE "tests/data/project.xml" ); Project project( projectFilename ); ARE_EQUAL(2, project.modules.size()); } _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp 2005-03-03 06:18:18 UTC (rev 13806) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp 2005-03-03 21:00:30 UTC (rev 13807) @@ -34,26 +34,26 @@
void SourceFileTest::IncludeTest () { - const Project project ( "tests" SSEP "data" SSEP "automaticdependency_include.xml" ); + const Project project ( RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency_include.xml" ); AutomaticDependency automaticDependency ( project ); automaticDependency.Process (); ARE_EQUAL( 4, automaticDependency.sourcefile_map.size () ); - const SourceFile* include = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile_include.h" ); + const SourceFile* include = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile_include.h" ); IS_NOT_NULL( include ); - const SourceFile* includenext = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1" SSEP "sourcefile_includenext.h" ); + const SourceFile* includenext = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile1" SSEP "sourcefile_includenext.h" ); IS_NOT_NULL( includenext ); }
void SourceFileTest::FullParseTest () { - const Project project ( "tests" SSEP "data" SSEP "automaticdependency.xml" ); + const Project project ( RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency.xml" ); AutomaticDependency automaticDependency ( project ); automaticDependency.Process (); ARE_EQUAL( 5, automaticDependency.sourcefile_map.size () ); - const SourceFile* header1 = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1_header1.h" ); + const SourceFile* header1 = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile1_header1.h" ); IS_NOT_NULL( header1 ); - const SourceFile* recurse = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1_recurse.h" ); + const SourceFile* recurse = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE"tests" SSEP "data" SSEP "sourcefile1_recurse.h" ); IS_NOT_NULL( recurse ); IS_TRUE( IsParentOf ( header1, recurse ) );