compbench-devel Mailing List for CompBenchmarks (Page 28)
Brought to you by:
xfred
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(51) |
Nov
(66) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(242) |
Feb
(56) |
Mar
(95) |
Apr
(120) |
May
(127) |
Jun
(32) |
Jul
(10) |
Aug
(55) |
Sep
(114) |
Oct
(3) |
Nov
|
Dec
|
From: Frederic T. <xf...@us...> - 2007-01-25 15:39:19
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8185 Modified Files: Benchmark-Autotools.cpp Package.cpp Log Message: CBM::Config used to handle package related data. Index: Package.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark/Package.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Package.cpp 22 Jan 2007 18:21:47 -0000 1.1 --- Package.cpp 25 Jan 2007 15:39:15 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- #include <Benchmark/Benchmark-DLLoader.h> + #include <Base/Config.h> #include <System/System.h> *************** *** 85,124 **** int Package::readStatus(void) { ! char s; ! std::string r; ! std::string id; ! ! id="bm-status-"; ! id+=Name(); ! ! ! r=system->read((char*) id.c_str()); ! ! if (r!="") { ! s=r.c_str()[0]; ! status=(Status) ((int) s - (int) '0'); ! return(1); ! } else { ! /* !!! */ ! return(0); ! } } int Package::resetContext(void) { ! std::string contextFile; ! ! contextFile=system->temporaryDirectory(System::Status); ! contextFile+="/"; ! ! contextFile+="bm-context-"; ! contextFile+=Name(); ! ! return(system->unlink(contextFile)); } std::string Package::localAbsoluteName(void) { ! std::string localFile = system->temporaryDirectory(System::Download); localFile+="/"; --- 86,101 ---- int Package::readStatus(void) { ! return(System()->Config()->getStatus(Name())); } int Package::resetContext(void) { ! System()->Config()->contextReset(Name()); ! return(1); } std::string Package::localAbsoluteName(void) { ! std::string localFile = system->Directory(System::Download); localFile+="/"; *************** *** 132,136 **** std::string cmd; ! cmd+=system->temporaryDirectory(System::Extract); cmd+="/"; cmd+=extractDirectory(); --- 109,113 ---- std::string cmd; ! cmd+=system->Directory(System::Extract); cmd+="/"; cmd+=extractDirectory(); *************** *** 182,200 **** int Package::storeStatus(Status _status) { ! int r; ! char c[16] = { 0 }; ! std::string tmp; ! std::string id; ! ! id="bm-status-"; ! id+=Name(); ! ! sprintf(c, "%d", (int) _status); ! tmp=c; ! r=system->store((char*) id.c_str(), ! tmp); ! ! status=_status; ! return(r); } --- 159,165 ---- int Package::storeStatus(Status _status) { ! System()->Config()->setStatus(Name(), ! _status); ! return(1); } *************** *** 211,226 **** CBM::CompilerOptions *_currentOptions) { ! std::string context = contextID(_currentCompiler, _currentOptions); ! std::string id; ! int r; ! ! id="bm-context-"; ! id+=Name(); ! ! r=system->store((char*) id.c_str(), ! context); ! ! return(r); } --- 176,183 ---- CBM::CompilerOptions *_currentOptions) { ! System()->Config()->setContext(Name(), ! _currentCompiler, _currentOptions); ! return(1); } *************** *** 228,249 **** CBM::CompilerOptions *_currentOptions) { ! std::string previousContext; ! std::string context; ! std::string id; ! ! id="bm-context-"; ! id+=Name(); ! ! previousContext=system->read((char*) id.c_str()); ! context=contextID(_currentCompiler, ! _currentOptions); ! ! if (context==previousContext) { ! currentCompiler=_currentCompiler; ! currentOptions=_currentOptions; ! return(1); ! } else { ! return(0); ! } } --- 185,191 ---- CBM::CompilerOptions *_currentOptions) { ! return(System()->Config()->contextMatches(Name(), ! _currentCompiler, ! _currentOptions)); } *************** *** 330,334 **** info+=localAbsoluteName(); info+=" into "; ! info+=system->temporaryDirectory(System::Extract); cbmUI->Fatal(info); } --- 272,276 ---- info+=localAbsoluteName(); info+=" into "; ! info+=system->Directory(System::Extract); cbmUI->Fatal(info); } *************** *** 627,631 **** int Package::Uninstall(void) { - std::string statusFile; int r; --- 569,572 ---- *************** *** 633,645 **** Name()); - statusFile=system->temporaryDirectory(System::Status); - statusFile+="/"; - statusFile+="bm-status-"; - statusFile+=Name(); - - if (getStatus()!=Unknown) { system->unlink(localAbsoluteName().c_str()); - system->unlink(statusFile.c_str()); resetContext(); r=uninstall(); --- 574,579 ---- Index: Benchmark-Autotools.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark/Benchmark-Autotools.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Benchmark-Autotools.cpp 22 Jan 2007 18:21:46 -0000 1.1 --- Benchmark-Autotools.cpp 25 Jan 2007 15:39:15 -0000 1.2 *************** *** 20,24 **** cmd+="cd "; ! cmd+=system->temporaryDirectory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_ZCAT; --- 20,24 ---- cmd+="cd "; ! cmd+=system->Directory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_ZCAT; |
From: Frederic T. <xf...@us...> - 2007-01-25 15:38:59
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7814 Modified Files: System.cpp System-Cygwin.cpp System-Cygwin.h System-FreeBSD.cpp System-FreeBSD.h System.h System-Linux.cpp System-Linux.h System-Unix.cpp System-Unix.h Log Message: CBM::Config used to handle package related data. Index: System-Cygwin.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Cygwin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-Cygwin.cpp 22 Jan 2007 17:50:39 -0000 1.1 --- System-Cygwin.cpp 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 12,17 **** #include <config.h> /* !!! */ ! SystemCygwin::SystemCygwin() ! : SystemUnix() { std::string cmd = "cscript.exe /nologo systemInfo.wmi"; --- 12,17 ---- #include <config.h> /* !!! */ ! SystemCygwin::SystemCygwin(std::string _filename) ! : SystemUnix(_filename) { std::string cmd = "cscript.exe /nologo systemInfo.wmi"; Index: System-Cygwin.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Cygwin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-Cygwin.h 22 Jan 2007 17:50:40 -0000 1.1 --- System-Cygwin.h 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 25,29 **** public: /** Constructor */ ! SystemCygwin(); /** Returns processor name --- 25,29 ---- public: /** Constructor */ ! SystemCygwin(std::string _filename = ""); /** Returns processor name Index: System-Linux.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Linux.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-Linux.cpp 22 Jan 2007 17:50:41 -0000 1.1 --- System-Linux.cpp 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 14,19 **** using namespace CBM; ! SystemLinux::SystemLinux() ! : SystemUnix() { } --- 14,19 ---- using namespace CBM; ! SystemLinux::SystemLinux(std::string _filename) ! : SystemUnix(_filename) { } Index: System.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System.h 22 Jan 2007 17:50:40 -0000 1.1 --- System.h 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 27,54 **** class System { public: /** Temporary directory. * Defines typedef used to query temporary directories used by CompBenchmarks. */ ! typedef enum Temp { Root, /*!< Root directory */ ! HostDep, /*!< Prefix for host-dependend directory */ ! Extract, /*!< Archive extraction temporary directory */ ! Patches, /*!< Directory holding patches */ ! OS, /*!< System specific material */ ! Download, /*!< Downloads temporary directory */ ! Status, /*!< Directory holding status of packages and ! * benchmarks */ ! Configuration /*!< Directory for configuration related ! * informations */ }; private: - /** Check if the given directory holds patches. - * Check if given arguments holds patches needed by libcompbenchmarks. - * \param dir directory to check - * \return non-null if ok. - */ - virtual int verifyPatchDirectory(std::string dir); - protected: /** \sa Packages() */ --- 27,47 ---- class System { + protected: + class Config *configuration; + std::string configurationFile; + public: /** Temporary directory. * Defines typedef used to query temporary directories used by CompBenchmarks. */ ! typedef enum Dir { Root, /*!< Root directory */ ! HostDep, /*!< Prefix for host-dependend directory */ ! Extract, /*!< Archive extraction temporary directory */ ! Patches, /*!< Directory holding patches */ ! OS, /*!< System specific material */ ! Download /*!< Downloads temporary directory */ }; private: protected: /** \sa Packages() */ *************** *** 61,66 **** std::string lastCommandOutput; ! /** Constructor. */ ! System(); /** Virtual destructor */ virtual ~System(); --- 54,61 ---- std::string lastCommandOutput; ! /** Constructor. ! * \param _filename XML configuration file. ~/.compbenchmarks/compbenchmarks.xml is used by default. ! */ ! System(std::string _filename = ""); /** Virtual destructor */ virtual ~System(); *************** *** 81,85 **** \return 1 if ok. */ ! virtual int CheckDirectory(Temp where); public: --- 76,80 ---- \return 1 if ok. */ ! virtual int CheckDirectory(Dir where); public: *************** *** 91,94 **** --- 86,98 ---- virtual int init(void); + /** Get used configuration. + \return A configuration instance (CBM::Config) + */ + class Config *Config(void); + + virtual int storeConfiguration(void); + + virtual std::string env(std::string _var); + /** Get host ID * As hostid command does on UNIX. *************** *** 248,252 **** * \return an absolute directory name */ ! virtual std::string temporaryDirectory(Temp where); /** Removes (unlink) a file --- 252,256 ---- * \return an absolute directory name */ ! virtual std::string Directory(Dir where); /** Removes (unlink) a file *************** *** 256,274 **** virtual int unlink(std::string localfile) = 0; - /** Stores an couple key/value - Each key must be unique. Value can be text, or number. - \param key Key name - \param value Value for the key. - \return 1 if ok. - */ - virtual int store(char *key, - std::string value); - - /** Retrieves the value of a key - * \param key key name - * \return key's value - */ - virtual std::string read(char *key); - /** Tests if a file exists * \param fn (absolute) filename to test for --- 260,263 ---- *************** *** 277,280 **** --- 266,272 ---- virtual int fileExists(std::string fn); + virtual int fileWrite(std::string fn, + std::string data); + /** Returns current time in seconds, since EPOC. * \return Current time. Index: System-FreeBSD.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-FreeBSD.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-FreeBSD.cpp 22 Jan 2007 17:50:40 -0000 1.1 --- System-FreeBSD.cpp 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 14,19 **** using namespace CBM; ! SystemFreeBSD::SystemFreeBSD() ! : SystemUnix() { } --- 14,19 ---- using namespace CBM; ! SystemFreeBSD::SystemFreeBSD(std::string _filename) ! : SystemUnix(_filename) { } Index: System.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System.cpp 22 Jan 2007 17:50:39 -0000 1.1 --- System.cpp 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- #include <System/System.h> + #include <Base/Config.h> #include <Base/md5.h> #include <Benchmark/Benchmark-DLLoader.h> *************** *** 23,30 **** System *CBM::cbmSystem =0; ! System::System() { std::string tmp; cbmSystem=this; --- 24,33 ---- System *CBM::cbmSystem =0; ! System::System(std::string _filename) { std::string tmp; + configurationFile=_filename; + cbmSystem=this; *************** *** 40,64 **** } ! int System::verifyPatchDirectory(std::string dir) { ! std::string fn; if (!checkDirectory(dir)) { - return(0); - } - fn+="/scimark2.patch.gz"; - - return(fileExists(fn)); - } ! int System::CheckDirectory(Temp where) ! { ! std::string dir = temporaryDirectory(where); ! int r; - cbmUI->Information(CBM::UI::DirectoryCheck, - dir); - - if (!checkDirectory(dir)) { r=mkdir(dir); --- 43,56 ---- } ! int System::CheckDirectory(Dir where) { ! std::string dir = Directory(where); ! int r = 1; if (!checkDirectory(dir)) { ! cbmUI->Information(CBM::UI::DirectoryCreate, ! dir); r=mkdir(dir); *************** *** 70,74 **** } ! return(1); } --- 62,66 ---- } ! return(r); } *************** *** 103,131 **** { std::string pid; ! pid=read("lockfile.pid"); ! if (pid!="") { ! cbmUI->Fatal("According to lockfile.pid, process " \ ! " already uses Compbenchmarks' administrative files."); ! } else { ! CheckDirectory(Root); ! CheckDirectory(HostDep); ! CheckDirectory(Extract); ! CheckDirectory(Download); ! CheckDirectory(Status); ! CheckDirectory(Configuration); ! char c[16] = { 0 }; ! std::string tmp; ! sprintf(c, "%d", (int) getpid()); ! tmp=c; ! packageList(); ! return(store("lockfile.pid", ! tmp)); ! ! } ! return(0); } --- 95,146 ---- { std::string pid; + std::string rootDir; + + rootDir=env("HOME"); + rootDir+="/.compbenchmarks"; ! if (configurationFile == "") { ! configurationFile=rootDir; ! configurationFile+="/compbenchmarks.xml"; ! } ! checkDirectory(rootDir); ! configuration=new CBM::Config(configurationFile); ! CheckDirectory(HostDep); ! CheckDirectory(Extract); ! CheckDirectory(Download); ! // CheckDirectory(Status); ! // CheckDirectory(Configuration); ! ! char c[16] = { 0 }; ! std::string tmp; ! ! sprintf(c, "%d", (int) getpid()); ! tmp=c; ! packageList(); ! ! return(1); ! } ! ! CBM::Config *System::Config(void) ! { ! return(configuration); ! } ! ! ! std::string System::env(std::string _var) ! { ! std::string result = getenv(_var.c_str()); ! ! return(result); ! } ! ! int System::storeConfiguration(void) ! { ! std::string data = Config()->str(); ! ! return(fileWrite(configurationFile, data)); } *************** *** 452,593 **** } ! std::string System::temporaryDirectory(Temp where) ! { ! std::string result; ! std::string host; ! ! result=getenv("HOME"); ! result+="/.compbenchmarks"; ! ! host=hostname(); ! ! switch(where) { ! case Root: ! break; ! case HostDep: ! result+="/"; ! result+=host; ! break; ! case Extract: ! result+="/"; ! result+=host; ! result+="/Extracts"; ! break; ! case Download: ! result+="/Downloads"; ! break; ! case Status: ! result+="/"; ! result+=host; ! result+="/Status"; ! break; ! case Configuration: ! result+="/"; ! result+=host; ! result+="/Configuration"; ! break; ! case Patches: ! result=DATAROOTDIR; ! result+="/"; ! result+=PACKAGE; ! result+="/"; ! result+=VERSION; ! result+="/"; ! result+="patches"; ! if (!verifyPatchDirectory(result)) { ! result=getenv("PWD"); ! result+="/share/patches"; ! if (!verifyPatchDirectory(result)) { ! result=getenv("PWD"); ! result+="/../share/patches"; ! } ! } ! break; ! case OS: ! result=DATAROOTDIR; ! result+="/"; ! result+=PACKAGE; ! result+="/"; ! result+=VERSION; ! result+="/"; ! result+="system"; ! if (!checkDirectory(result)) { ! result=getenv("PWD"); ! result+="/share/system/"; ! #ifdef CBM_SYSTEM_CYGWIN ! result+="cygwin"; ! #else ! result=""; ! #endif ! } ! break; ! default: ! cbmUI->Fatal("Internal : Bad 'where' parameters in System::temporaryDirectory();"); ! return(""); ! } ! ! return(result); ! } ! ! int System::store(char *key, ! std::string value) { ! std::string fn; ! std::ofstream OUT; ! ! fn=temporaryDirectory(System::Status); ! fn+="/"; ! fn+=key; ! OUT.open(fn.c_str(),std::ios::out); ! OUT << value; ! OUT.close(); ! /* !!! */ ! ! return(1); } ! std::string System::read(char *key) { - std::string fn; std::ifstream IN; - std::ifstream::pos_type size; - char *buf; - std::string result; - - fn=temporaryDirectory(System::Status); - fn+="/"; - fn+=key; - IN.open(fn.c_str(), std::ios::in | std::ios::binary | std::ios::ate); - if (IN.is_open()) { - size=IN.tellg(); - buf=new char[size]; - IN.seekg(0, std::ios::beg); - IN.read(buf, size); IN.close(); ! ! result.append(buf, size); ! ! delete[](buf); } else { ! /* !!! */ } - - return(result); } ! int System::fileExists(std::string fn) { ! std::ifstream IN; ! IN.open(fn.c_str(), ! std::ios::in | ! std::ios::binary | ! std::ios::ate); ! if (IN.is_open()) { ! IN.close(); return(1); } else { --- 467,501 ---- } ! std::string System::Directory(Dir where) { ! return(configuration->Path(where)); } ! int System::fileExists(std::string fn) { std::ifstream IN; IN.open(fn.c_str(), std::ios::in | std::ios::binary | std::ios::ate); if (IN.is_open()) { IN.close(); ! return(1); } else { ! return(0); } } ! int System::fileWrite(std::string fn, ! std::string data) { ! std::ofstream OUT; ! OUT.open(fn.c_str(), ! std::ios::out | ! std::ios::binary | ! std::ios::ate); ! if (OUT.is_open()) { ! OUT << data; ! OUT.close(); return(1); } else { *************** *** 606,613 **** CBM::cbmlib_done(); ! fn=temporaryDirectory(System::Status); ! fn+="/"; ! fn+="lockfile.pid"; ! return(unlink(fn)); } --- 514,522 ---- CBM::cbmlib_done(); ! if (configuration->Changes()) { ! storeConfiguration(); ! } ! ! return(1); } *************** *** 624,626 **** --- 533,536 ---- System::~System() { + delete(configuration); } Index: System-Linux.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Linux.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-Linux.h 22 Jan 2007 17:50:41 -0000 1.1 --- System-Linux.h 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 23,27 **** public: /** Constructor */ ! SystemLinux(); /** Returns processor name --- 23,27 ---- public: /** Constructor */ ! SystemLinux(std::string _filename = ""); /** Returns processor name Index: System-FreeBSD.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-FreeBSD.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-FreeBSD.h 22 Jan 2007 17:50:40 -0000 1.1 --- System-FreeBSD.h 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 23,27 **** public: /** Constructor */ ! SystemFreeBSD(); /** Returns processor name --- 23,27 ---- public: /** Constructor */ ! SystemFreeBSD(std::string _filename = ""); /** Returns processor name Index: System-Unix.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Unix.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-Unix.cpp 22 Jan 2007 17:50:41 -0000 1.1 --- System-Unix.cpp 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 22,27 **** } ! SystemUnix::SystemUnix() ! : System() { signal(SIGINT, sysunix_sighandler); --- 22,27 ---- } ! SystemUnix::SystemUnix(std::string _filename) ! : System(_filename) { signal(SIGINT, sysunix_sighandler); Index: System-Unix.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Unix.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** System-Unix.h 22 Jan 2007 17:50:41 -0000 1.1 --- System-Unix.h 25 Jan 2007 15:38:49 -0000 1.2 *************** *** 31,35 **** public: /** Constructor. */ ! SystemUnix(); virtual int copy(std::string from, std::string to); --- 31,35 ---- public: /** Constructor. */ ! SystemUnix(std::string _filename = ""); virtual int copy(std::string from, std::string to); |
From: Frederic T. <xf...@us...> - 2007-01-25 15:38:23
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7796 Modified Files: Benchmark-BENCHPP.cpp Benchmark-BENCHPPLINUX.cpp Benchmark-NBENCH.cpp Benchmark-SCIMARK2.cpp Log Message: CBM::Config used to handle package related data. Index: Benchmark-BENCHPP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPP.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Benchmark-BENCHPP.cpp 21 Jan 2007 21:27:37 -0000 1.6 --- Benchmark-BENCHPP.cpp 25 Jan 2007 15:38:19 -0000 1.7 *************** *** 83,87 **** std::string patch; ! patch+=system->temporaryDirectory(CBM::System::Patches); patch+="/benchpp.patch.gz"; --- 83,87 ---- std::string patch; ! patch+=system->Directory(CBM::System::Patches); patch+="/benchpp.patch.gz"; *************** *** 109,113 **** cmd+="cd "; ! cmd+=system->temporaryDirectory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_ZCAT; --- 109,113 ---- cmd+="cd "; ! cmd+=system->Directory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_ZCAT; Index: Benchmark-NBENCH.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-NBENCH.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Benchmark-NBENCH.cpp 21 Jan 2007 21:27:37 -0000 1.5 --- Benchmark-NBENCH.cpp 25 Jan 2007 15:38:19 -0000 1.6 *************** *** 66,70 **** cmd+="cd "; ! cmd+=system->temporaryDirectory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_ZCAT; --- 66,70 ---- cmd+="cd "; ! cmd+=system->Directory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_ZCAT; Index: Benchmark-BENCHPPLINUX.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Benchmark-BENCHPPLINUX.cpp 21 Jan 2007 21:27:37 -0000 1.9 --- Benchmark-BENCHPPLINUX.cpp 25 Jan 2007 15:38:19 -0000 1.10 *************** *** 79,83 **** cmd+="cd "; ! cmd+=system->temporaryDirectory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_MKDIR; --- 79,83 ---- cmd+="cd "; ! cmd+=system->Directory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_MKDIR; Index: Benchmark-SCIMARK2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-SCIMARK2.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Benchmark-SCIMARK2.cpp 21 Jan 2007 21:27:37 -0000 1.6 --- Benchmark-SCIMARK2.cpp 25 Jan 2007 15:38:19 -0000 1.7 *************** *** 78,82 **** std::string patch; ! patch+=system->temporaryDirectory(CBM::System::Patches); patch+="/scimark2.patch.gz"; --- 78,82 ---- std::string patch; ! patch+=system->Directory(CBM::System::Patches); patch+="/scimark2.patch.gz"; *************** *** 104,108 **** cmd+="cd "; ! cmd+=system->temporaryDirectory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_MKDIR; --- 104,108 ---- cmd+="cd "; ! cmd+=system->Directory(CBM::System::Extract); cmd+=" && "; cmd+=CBM_PROG_MKDIR; *************** *** 114,118 **** cmd+=CBM_PROG_UNZIP; cmd+=" "; ! cmd+=system->temporaryDirectory(CBM::System::Download); cmd+="/"; cmd+=localName(); --- 114,118 ---- cmd+=CBM_PROG_UNZIP; cmd+=" "; ! cmd+=system->Directory(CBM::System::Download); cmd+="/"; cmd+=localName(); |
From: Frederic T. <xf...@us...> - 2007-01-25 01:51:57
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28696 Modified Files: main.h Log Message: Homepage fixed. Index: main.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/main.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.h 15 Jan 2007 18:58:05 -0000 1.7 --- main.h 25 Jan 2007 01:51:54 -0000 1.8 *************** *** 21,25 **** * * New releases and complementory information can be found at ! * http://compbench.sourceforge.net. * * \section abstraction General organisation --- 21,25 ---- * * New releases and complementory information can be found at ! * http://compbench.sourceforge.net . * * \section abstraction General organisation |
From: Frederic T. <xf...@us...> - 2007-01-24 20:32:35
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21115 Modified Files: Makefile.am Log Message: compbenchmarks-config-0.xml added. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 23 Jan 2007 18:48:47 -0000 1.3 --- Makefile.am 24 Jan 2007 20:32:31 -0000 1.4 *************** *** 1 **** ! dist_noinst_DATA = CBMSystem-copy.data compiler-fake-g++-4.1.1-13 compiler-fake-gcc-4.1.1-13 compiler-fake-tcc-0.9.23 compbenchmarks-0.xml compbenchmarks-1.xml \ No newline at end of file --- 1 ---- ! dist_noinst_DATA = CBMSystem-copy.data compiler-fake-g++-4.1.1-13 compiler-fake-gcc-4.1.1-13 compiler-fake-tcc-0.9.23 compbenchmarks-0.xml compbenchmarks-1.xml compbenchmarks-config-0.xml \ No newline at end of file |
From: Frederic T. <xf...@us...> - 2007-01-24 20:31:40
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20724 Modified Files: CBM.pm CBM_wrap.cxx Log Message: XML related API improvements. Index: CBM.pm =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CBM.pm 24 Jan 2007 19:33:41 -0000 1.13 --- CBM.pm 24 Jan 2007 20:31:36 -0000 1.14 *************** *** 484,488 **** *UO_fatal = *CBMc::UO_fatal; *H_XMLREADER = *CBMc::H_XMLREADER; ! *H_XMLCONFIG = *CBMc::H_XMLCONFIG; my %__cbmSystem_hash; --- 484,488 ---- *UO_fatal = *CBMc::UO_fatal; *H_XMLREADER = *CBMc::H_XMLREADER; ! *H_CBMCONFIG = *CBMc::H_CBMCONFIG; my %__cbmSystem_hash; Index: CBM_wrap.cxx =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM_wrap.cxx,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CBM_wrap.cxx 24 Jan 2007 19:33:41 -0000 1.13 --- CBM_wrap.cxx 24 Jan 2007 20:31:36 -0000 1.14 *************** *** 8819,8823 **** SWIG_TypeClientData(SWIGTYPE_p_CBM__XMLReader, (void*) "CBM::XMLReader"); /*@SWIG:%set_constant@*/ do { ! SV *sv = get_sv((char*) SWIG_prefix "H_XMLCONFIG", TRUE | 0x2); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(1))); SvREADONLY_on(sv); --- 8819,8823 ---- SWIG_TypeClientData(SWIGTYPE_p_CBM__XMLReader, (void*) "CBM::XMLReader"); /*@SWIG:%set_constant@*/ do { ! SV *sv = get_sv((char*) SWIG_prefix "H_CBMCONFIG", TRUE | 0x2); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(1))); SvREADONLY_on(sv); |
From: Frederic T. <xf...@us...> - 2007-01-24 20:29:23
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19933 Modified Files: Makefile.am Log Message: CBM.i added. ln -sf used. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 24 Jan 2007 19:33:12 -0000 1.10 --- Makefile.am 24 Jan 2007 20:29:18 -0000 1.11 *************** *** 31,35 **** # data_DATA = $(top_srcdir)/CBM-PI/CBM.pm ! EXTRA_DIST = CBM.pm inst_pkgdata_DATA = CBM.so $(top_srcdir)/CBM-PI/CBM.pm --- 31,35 ---- # data_DATA = $(top_srcdir)/CBM-PI/CBM.pm ! EXTRA_DIST = CBM.pm CBM.i inst_pkgdata_DATA = CBM.so $(top_srcdir)/CBM-PI/CBM.pm *************** *** 55,59 **** CBM.so: libCBM.la ! rm CBM.so; ln -s .libs/libCBM.so CBM.so all-local: CBM.so --- 55,59 ---- CBM.so: libCBM.la ! ln -sf .libs/libCBM.so CBM.so all-local: CBM.so |
From: Frederic T. <xf...@us...> - 2007-01-24 19:39:24
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1578 Modified Files: XML.cpp XML.h Log Message: getChild() and getAttribute() by names. Index: XML.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XML.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XML.h 23 Jan 2007 18:44:18 -0000 1.2 --- XML.h 24 Jan 2007 19:39:18 -0000 1.3 *************** *** 104,107 **** --- 104,111 ---- virtual XMLNode *getChild(int _index); + /** Get a child node according to its name + * \return A node + * \sa getChild() */ + virtual XMLNode *getChild(std::string _name); /** Get attributes' number *************** *** 110,113 **** --- 114,122 ---- virtual int attributeNumber(void); + /** Get an attribute according to its name + * \return An attribute + * \sa getAttribute()() */ + virtual XMLAttribute *getAttribute(std::string _name); + /** Get an attribute according to its index * \return An attribute Index: XML.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XML.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XML.cpp 23 Jan 2007 18:44:18 -0000 1.2 --- XML.cpp 24 Jan 2007 19:39:18 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- #include <Base/XML.h> + #include <System/System.h> + using namespace CBM; *************** *** 27,30 **** --- 29,33 ---- } + void XMLAttribute::setValue(std::string _value) { *************** *** 85,88 **** --- 88,106 ---- } + XMLNode *XMLNode::getChild(std::string _name) + { + int i; + int n = childNumber(); + XMLNode *N = 0; + + for(i=0; i<n; i++) { + N=getChild(i); + if (N->Name() == _name) + return(N); + } + + return(N); + } + int XMLNode::attributeNumber(void) { *************** *** 90,93 **** --- 108,126 ---- } + XMLAttribute *XMLNode::getAttribute(std::string _name) + { + int i; + int n = attributeNumber(); + XMLAttribute *A = 0; + + for(i=0; i<n; i++) { + A=getAttribute(i); + if (A->Name() == _name) + return(A); + } + + return(A); + } + XMLAttribute *XMLNode::getAttribute(int _index) { |
From: Frederic T. <xf...@us...> - 2007-01-24 19:38:34
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1209 Modified Files: Makefile.am Log Message: Config files added. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 23 Jan 2007 18:46:27 -0000 1.3 --- Makefile.am 24 Jan 2007 19:38:31 -0000 1.4 *************** *** 10,14 **** noinst_LTLIBRARIES = libBase.la ! sources = XML.cpp XMLReader.cpp md5.cpp libBase_la_SOURCES = $(sources) $(source_sys) --- 10,14 ---- noinst_LTLIBRARIES = libBase.la ! sources = XML.cpp XMLReader.cpp md5.cpp Config.cpp libBase_la_SOURCES = $(sources) $(source_sys) |
From: Frederic T. <xf...@us...> - 2007-01-24 19:37:59
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv826 Added Files: Config.cpp Config.h Log Message: First import. --- NEW FILE: Config.h --- /* ---------------------------------------------------------------------------- $Id: Config.h,v 1.1 2007/01/24 19:37:47 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCONFIG #define H_CBMCONFIG 1 #include <Benchmark/Package.h> #include <Base/XML.h> namespace CBM { /** \brief Interface to configuration * Class proposing API to configuration parameters and run context. */ class Config { protected: XMLNode *root; XMLNode *benchmarks; XMLNode *bmNode(std::string _bid); public: /** Constructor */ Config(std::string _filename); virtual CBM::Package::Status getStatus(std::string _bid); virtual void setStatus(std::string _bid, CBM::Package::Status _status); virtual std::string str(void); /** Destructor */ virtual ~Config(); }; } #endif --- NEW FILE: Config.cpp --- /* ---------------------------------------------------------------------------- $Id: Config.cpp,v 1.1 2007/01/24 19:37:47 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Base/Config.h> #include <Base/XMLReader.h> #include <config.h> using namespace CBM; Config::Config(std::string _filename) { CBM::XMLReader r; CBM::XMLAttribute *A; root=r.read(_filename); if (root->Name() != "libcompbenchmarks") { delete(root); } if (!root) { root=new CBM::XMLNode("libcompbenchmarks"); } if (!root->getAttribute("version")) { A=new CBM::XMLAttribute("version", VERSION); root->add(A); } benchmarks=root->getChild("benchmarks"); printf("init benchmarks=%x\n", (unsigned int) benchmarks); if (!benchmarks) { benchmarks=root->addNode("benchmarks"); } } CBM::XMLNode *Config::bmNode(std::string _bid) { int i; int n = benchmarks->childNumber(); CBM::XMLNode *N; CBM::XMLAttribute *A; std::string tmp; char c[32]; for(i=0;i<n;i++) { N=benchmarks->getChild(i); if (N->Name() != "benchmark") continue; A=N->getAttribute("id"); if ((!A) || (A->Value() != _bid)) continue; return(N); } N=new CBM::XMLNode("benchmark"); N->addAttribute("id", _bid); sprintf(c, "%d", (int) CBM::Package::Unknown); tmp=c; N->addAttribute("status", tmp); benchmarks->add(N); return(N); } CBM::Package::Status Config::getStatus(std::string _bid) { CBM::XMLNode *N; CBM::XMLAttribute *A; std::string tmp; N=bmNode(_bid); A=N->getAttribute("status"); if (A) { tmp=A->Value(); if (tmp!="") return((CBM::Package::Status) ((int) tmp[0]-(int) '0')); } return(CBM::Package::Unknown); } void Config::setStatus(std::string _bid, CBM::Package::Status _status) { CBM::XMLNode *N; CBM::XMLAttribute *A; std::string tmp; char c[32]; sprintf(c, "%d", (int) _status); tmp=c; N=bmNode(_bid); A=N->getAttribute("status"); A->setValue(tmp); } std::string Config::str(void) { return(root->str()); } Config::~Config() { } |
From: Frederic T. <xf...@us...> - 2007-01-24 19:36:58
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv450 Modified Files: compbenchmarks-0.xml compbenchmarks-1.xml Log Message: XML file banner added. Index: compbenchmarks-1.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference/compbenchmarks-1.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compbenchmarks-1.xml 23 Jan 2007 18:48:46 -0000 1.1 --- compbenchmarks-1.xml 24 Jan 2007 19:36:55 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + <?xml version="1.0" ?> + <libcompbenchmarks version="0.5.0"> <paths> Index: compbenchmarks-0.xml =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference/compbenchmarks-0.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compbenchmarks-0.xml 23 Jan 2007 18:48:46 -0000 1.1 --- compbenchmarks-0.xml 24 Jan 2007 19:36:55 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + <?xml version="1.0" ?> + <libcompbenchmarks version="0.5.0"> <cont> |
From: Frederic T. <xf...@us...> - 2007-01-24 19:36:32
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv426 Added Files: compbenchmarks-config-0.xml Log Message: First import. --- NEW FILE: compbenchmarks-config-0.xml --- <?xml version="1.0" ?> <libcompbenchmarks version="0.5.0"> <benchmarks> <benchmark id="gzip-1c" status="0"/> </benchmarks> </libcompbenchmarks> |
From: Frederic T. <xf...@us...> - 2007-01-24 19:35:30
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv32498 Modified Files: 00-XML.pl Log Message: XML file banner added. Improved test set. Index: 00-XML.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/00-XML.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 00-XML.pl 23 Jan 2007 18:49:36 -0000 1.3 --- 00-XML.pl 24 Jan 2007 19:35:26 -0000 1.4 *************** *** 6,10 **** require "libtest.pl"; ! use Test::Simple tests => 36; my $sys; --- 6,10 ---- require "libtest.pl"; ! use Test::Simple tests => 40; my $sys; *************** *** 86,89 **** --- 86,91 ---- ok($root->childNumber() == 1); ok($child->childNumber() == 0); + my $c = $root->getChild("child"); + ok($c->Name() eq $child->Name()); test_node_eq($child, $root->getChild(0)); test_str($root, "<root>\n <child/>\n</root>"); *************** *** 98,101 **** --- 100,104 ---- $root->add($att0); test_attribute($root->getAttribute(0), "att0", undef); + test_attribute($root->getAttribute("att0"), "att0", undef); } *************** *** 137,141 **** my $H = $X->read($fn); ! ok($H->str() eq $e, "Parsing of $_:\nEXPECTED:$e\nEOF\nHAS*****:" . $H->str() . "\nEOF"); } } --- 140,145 ---- my $H = $X->read($fn); ! my $w = "<?xml version=\"1.0\" ?>\n\n" . $H->str(); ! ok($w eq $e, "Parsing of $_:\nEXPECTED:$e\nEOF\nHAS*****:" . $w . "\nEOF"); } } |
From: Frederic T. <xf...@us...> - 2007-01-24 19:34:46
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv32118 Modified Files: Makefile.am Log Message: More tests. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 23 Jan 2007 18:51:06 -0000 1.8 --- Makefile.am 24 Jan 2007 19:34:43 -0000 1.9 *************** *** 5,9 **** 02-CBMSystem-benchs.pl \ 00-XML.pl \ ! 03-CBMCompilerSelector-public.pl tests = $(top_srcdir)/CBM-PI/t/00-Glue.pl \ --- 5,10 ---- 02-CBMSystem-benchs.pl \ 00-XML.pl \ ! 03-CBMCompilerSelector-public.pl \ ! 04-Config.pl tests = $(top_srcdir)/CBM-PI/t/00-Glue.pl \ *************** *** 12,16 **** $(top_srcdir)/CBM-PI/t/01-CBMSystem-protected.pl \ $(top_srcdir)/CBM-PI/t/02-CBMSystem-benchs.pl \ ! $(top_srcdir)/CBM-PI/t/03-CBMCompilerSelector-public.pl dist_noinst_DATA = $(prog_tests) --- 13,18 ---- $(top_srcdir)/CBM-PI/t/01-CBMSystem-protected.pl \ $(top_srcdir)/CBM-PI/t/02-CBMSystem-benchs.pl \ ! $(top_srcdir)/CBM-PI/t/03-CBMCompilerSelector-public.pl \ ! $(top_srcdir)/CBM-PI/t/04-Config.pl dist_noinst_DATA = $(prog_tests) |
From: Frederic T. <xf...@us...> - 2007-01-24 19:34:16
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv32078 Added Files: 04-Config.pl Log Message: First import. --- NEW FILE: 04-Config.pl --- #!/usr/bin/perl -w -I .. use strict; use CBM; push(@INC, "lib"); require "libtest.pl"; use Test::Simple tests => 7; my $sys; our $top_srcdir; sub test_config { my $X = CBM::Config->new("$top_srcdir/reference/compbenchmarks-config-0.xml"); my $v = $X->getStatus("gzip-1c"); ok($v == 0, "gzip-1c status is 0 ($v)"); my $x = <<EOF <libcompbenchmarks version="0.5.0"> <benchmarks> <benchmark id="gzip-1c" status="0"/> </benchmarks> </libcompbenchmarks> EOF ; chomp($x); ok($x eq $X->str()); $X->setStatus("gzip-1c", 1); $x = <<EOF <libcompbenchmarks version="0.5.0"> <benchmarks> <benchmark id="gzip-1c" status="1"/> </benchmarks> </libcompbenchmarks> EOF ; chomp($x); ok($x eq $X->str()); $v = $X->getStatus("gzip-1c"); ok($v == 1, "gzip-1c status is 1 ($v)"); ok($X->getStatus("test") == 0); $X->setStatus("test", 2); ok($X->getStatus("test") == 2); $x = <<EOF <libcompbenchmarks version="0.5.0"> <benchmarks> <benchmark id="gzip-1c" status="1"/> <benchmark id="test" status="2"/> </benchmarks> </libcompbenchmarks> EOF ; chomp($x); ok($x eq $X->str()); } $sys = CBM::Init(); test_config(); $sys->done(); |
From: Frederic T. <xf...@us...> - 2007-01-24 19:33:50
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31711 Modified Files: CBM.i CBM.pm CBM_wrap.cxx Log Message: XML related API improvements. Index: CBM.pm =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CBM.pm 23 Jan 2007 18:56:28 -0000 1.12 --- CBM.pm 24 Jan 2007 19:33:41 -0000 1.13 *************** *** 142,145 **** --- 142,146 ---- *Comments = *CBMc::Benchmark_Comments; *Bench = *CBMc::Benchmark_Bench; + *executionTime = *CBMc::Benchmark_executionTime; sub DESTROY { return unless $_[0]->isa('HASH'); *************** *** 182,185 **** --- 183,187 ---- *Value = *CBMc::XMLAttribute_Value; *setValue = *CBMc::XMLAttribute_setValue; + *append = *CBMc::XMLAttribute_append; sub DESTROY { return unless $_[0]->isa('HASH'); *************** *** 222,225 **** --- 224,228 ---- *Value = *CBMc::XMLNode_Value; *setValue = *CBMc::XMLNode_setValue; + *append = *CBMc::XMLNode_append; *childNumber = *CBMc::XMLNode_childNumber; *getChild = *CBMc::XMLNode_getChild; *************** *** 292,295 **** --- 295,338 ---- + ############# Class : CBM::Config ############## + + package CBM::Config; + use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); + @ISA = qw( CBM ); + %OWNER = (); + %ITERATORS = (); + sub new { + my $pkg = shift; + my $self = CBMc::new_Config(@_); + bless $self, $pkg if defined($self); + } + + *getStatus = *CBMc::Config_getStatus; + *setStatus = *CBMc::Config_setStatus; + *str = *CBMc::Config_str; + sub DESTROY { + return unless $_[0]->isa('HASH'); + my $self = tied(%{$_[0]}); + return unless defined $self; + delete $ITERATORS{$self}; + if (exists $OWNER{$self}) { + CBMc::delete_Config($self); + delete $OWNER{$self}; + } + } + + sub DISOWN { + my $self = shift; + my $ptr = tied(%$self); + delete $OWNER{$ptr}; + } + + sub ACQUIRE { + my $self = shift; + my $ptr = tied(%$self); + $OWNER{$ptr} = 1; + } + + ############# Class : CBM::System ############## *************** *** 441,444 **** --- 484,488 ---- *UO_fatal = *CBMc::UO_fatal; *H_XMLREADER = *CBMc::H_XMLREADER; + *H_XMLCONFIG = *CBMc::H_XMLCONFIG; my %__cbmSystem_hash; Index: CBM_wrap.cxx =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM_wrap.cxx,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CBM_wrap.cxx 23 Jan 2007 18:56:28 -0000 1.12 --- CBM_wrap.cxx 24 Jan 2007 19:33:41 -0000 1.13 *************** *** 1384,1400 **** #define SWIGTYPE_p_CBM__Compiler swig_types[2] #define SWIGTYPE_p_CBM__CompilerSelector swig_types[3] ! #define SWIGTYPE_p_CBM__Package swig_types[4] ! #define SWIGTYPE_p_CBM__System swig_types[5] ! #define SWIGTYPE_p_CBM__XMLAttribute swig_types[6] ! #define SWIGTYPE_p_CBM__XMLNode swig_types[7] ! #define SWIGTYPE_p_CBM__XMLReader swig_types[8] ! #define SWIGTYPE_p_Compiler swig_types[9] ! #define SWIGTYPE_p_CompilerOptions swig_types[10] ! #define SWIGTYPE_p_char swig_types[11] ! #define SWIGTYPE_p_std__string swig_types[12] ! #define SWIGTYPE_p_std__vectorTstd__string_t swig_types[13] ! #define SWIGTYPE_p_time_t swig_types[14] ! static swig_type_info *swig_types[16]; ! static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) --- 1384,1401 ---- #define SWIGTYPE_p_CBM__Compiler swig_types[2] #define SWIGTYPE_p_CBM__CompilerSelector swig_types[3] ! #define SWIGTYPE_p_CBM__Config swig_types[4] ! #define SWIGTYPE_p_CBM__Package swig_types[5] ! #define SWIGTYPE_p_CBM__System swig_types[6] ! #define SWIGTYPE_p_CBM__XMLAttribute swig_types[7] ! #define SWIGTYPE_p_CBM__XMLNode swig_types[8] ! #define SWIGTYPE_p_CBM__XMLReader swig_types[9] ! #define SWIGTYPE_p_Compiler swig_types[10] ! #define SWIGTYPE_p_CompilerOptions swig_types[11] ! #define SWIGTYPE_p_char swig_types[12] ! #define SWIGTYPE_p_std__string swig_types[13] ! #define SWIGTYPE_p_std__vectorTstd__string_t swig_types[14] ! #define SWIGTYPE_p_time_t swig_types[15] ! static swig_type_info *swig_types[17]; ! static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) *************** *** 1472,1475 **** --- 1473,1477 ---- #include "Base/XML.h" #include "Base/XMLReader.h" + #include "Base/Config.h" using namespace CBM; *************** *** 4362,4365 **** --- 4364,4396 ---- + XS(_wrap_Benchmark_executionTime) { + { + CBM::Benchmark *arg1 = (CBM::Benchmark *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Benchmark_executionTime(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__Benchmark, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Benchmark_executionTime" "', argument " "1"" of type '" "CBM::Benchmark *""'"); + } + arg1 = reinterpret_cast<CBM::Benchmark * >(argp1); + result = (arg1)->executionTime(); + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast<std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } + } + + XS(_wrap_delete_Benchmark) { { *************** *** 4630,4633 **** --- 4661,4704 ---- + XS(_wrap_XMLAttribute_append) { + { + CBM::XMLAttribute *arg1 = (CBM::XMLAttribute *) 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: XMLAttribute_append(self,_value);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__XMLAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XMLAttribute_append" "', argument " "1"" of type '" "CBM::XMLAttribute *""'"); + } + arg1 = reinterpret_cast<CBM::XMLAttribute * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "XMLAttribute_append" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + (arg1)->append(arg2); + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } + } + + XS(_wrap_delete_XMLAttribute) { { *************** *** 4898,4901 **** --- 4969,5012 ---- + XS(_wrap_XMLNode_append) { + { + CBM::XMLNode *arg1 = (CBM::XMLNode *) 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: XMLNode_append(self,_value);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__XMLNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XMLNode_append" "', argument " "1"" of type '" "CBM::XMLNode *""'"); + } + arg1 = reinterpret_cast<CBM::XMLNode * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "XMLNode_append" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + (arg1)->append(arg2); + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } + } + + XS(_wrap_XMLNode_childNumber) { { *************** *** 4927,4931 **** ! XS(_wrap_XMLNode_getChild) { { CBM::XMLNode *arg1 = (CBM::XMLNode *) 0 ; --- 5038,5042 ---- ! XS(_wrap_XMLNode_getChild__SWIG_0) { { CBM::XMLNode *arg1 = (CBM::XMLNode *) 0 ; *************** *** 4966,4969 **** --- 5077,5201 ---- + XS(_wrap_XMLNode_getChild__SWIG_1) { + { + CBM::XMLNode *arg1 = (CBM::XMLNode *) 0 ; + std::string arg2 ; + CBM::XMLNode *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: XMLNode_getChild(self,_name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__XMLNode, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XMLNode_getChild" "', argument " "1"" of type '" "CBM::XMLNode *""'"); + } + arg1 = reinterpret_cast<CBM::XMLNode * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "XMLNode_getChild" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = (CBM::XMLNode *)(arg1)->getChild(arg2); + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CBM__XMLNode, 0 | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } + } + + + XS(_wrap_XMLNode_getChild) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CBM__XMLNode, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CBM__XMLNode, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + (*PL_markstack_ptr++);SWIG_CALLXS(_wrap_XMLNode_getChild__SWIG_0); return; + case 2: + (*PL_markstack_ptr++);SWIG_CALLXS(_wrap_XMLNode_getChild__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'XMLNode_getChild'"); + XSRETURN(0); + } + + XS(_wrap_XMLNode_attributeNumber) { { *************** *** 4995,4999 **** ! XS(_wrap_XMLNode_getAttribute) { { CBM::XMLNode *arg1 = (CBM::XMLNode *) 0 ; --- 5227,5272 ---- ! XS(_wrap_XMLNode_getAttribute__SWIG_0) { ! { ! CBM::XMLNode *arg1 = (CBM::XMLNode *) 0 ; ! std::string arg2 ; ! CBM::XMLAttribute *result = 0 ; ! void *argp1 = 0 ; ! int res1 = 0 ; ! int argvi = 0; ! dXSARGS; ! ! if ((items < 2) || (items > 2)) { ! SWIG_croak("Usage: XMLNode_getAttribute(self,_name);"); ! } ! res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__XMLNode, 0 | 0 ); ! if (!SWIG_IsOK(res1)) { ! SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XMLNode_getAttribute" "', argument " "1"" of type '" "CBM::XMLNode *""'"); ! } ! arg1 = reinterpret_cast<CBM::XMLNode * >(argp1); ! { ! std::string *ptr = (std::string *)0; ! int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); ! if (!SWIG_IsOK(res) || !ptr) { ! SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "XMLNode_getAttribute" "', argument " "2"" of type '" "std::string""'"); ! } ! arg2 = *ptr; ! if (SWIG_IsNewObj(res)) delete ptr; ! } ! result = (CBM::XMLAttribute *)(arg1)->getAttribute(arg2); ! ! ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CBM__XMLAttribute, 0 | SWIG_SHADOW); argvi++ ; ! ! ! XSRETURN(argvi); ! fail: ! ! ! SWIG_croak_null(); ! } ! } ! ! ! XS(_wrap_XMLNode_getAttribute__SWIG_1) { { CBM::XMLNode *arg1 = (CBM::XMLNode *) 0 ; *************** *** 5034,5037 **** --- 5307,5390 ---- + XS(_wrap_XMLNode_getAttribute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CBM__XMLNode, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CBM__XMLNode, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + (*PL_markstack_ptr++);SWIG_CALLXS(_wrap_XMLNode_getAttribute__SWIG_1); return; + case 2: + (*PL_markstack_ptr++);SWIG_CALLXS(_wrap_XMLNode_getAttribute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'XMLNode_getAttribute'"); + XSRETURN(0); + } + + XS(_wrap_XMLNode_add__SWIG_0) { { *************** *** 5808,5811 **** --- 6161,6343 ---- + XS(_wrap_new_Config) { + { + std::string arg1 ; + CBM::Config *result = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Config(_filename);"); + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Config" "', argument " "1"" of type '" "std::string""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = (CBM::Config *)new CBM::Config(arg1); + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CBM__Config, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } + } + + + XS(_wrap_Config_getStatus) { + { + CBM::Config *arg1 = (CBM::Config *) 0 ; + std::string arg2 ; + CBM::Package::Status result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Config_getStatus(self,_bid);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__Config, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Config_getStatus" "', argument " "1"" of type '" "CBM::Config *""'"); + } + arg1 = reinterpret_cast<CBM::Config * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Config_getStatus" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = (CBM::Package::Status)(arg1)->getStatus(arg2); + + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } + } + + + XS(_wrap_Config_setStatus) { + { + CBM::Config *arg1 = (CBM::Config *) 0 ; + std::string arg2 ; + CBM::Package::Status arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Config_setStatus(self,_bid,_status);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__Config, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Config_setStatus" "', argument " "1"" of type '" "CBM::Config *""'"); + } + arg1 = reinterpret_cast<CBM::Config * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Config_setStatus" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Config_setStatus" "', argument " "3"" of type '" "CBM::Package::Status""'"); + } + arg3 = static_cast<CBM::Package::Status >(val3); + (arg1)->setStatus(arg2,arg3); + + + + + + XSRETURN(argvi); + fail: + + + + SWIG_croak_null(); + } + } + + + XS(_wrap_Config_str) { + { + CBM::Config *arg1 = (CBM::Config *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Config_str(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__Config, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Config_str" "', argument " "1"" of type '" "CBM::Config *""'"); + } + arg1 = reinterpret_cast<CBM::Config * >(argp1); + result = (arg1)->str(); + + ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast<std::string >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } + } + + + XS(_wrap_delete_Config) { + { + CBM::Config *arg1 = (CBM::Config *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Config(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__Config, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Config" "', argument " "1"" of type '" "CBM::Config *""'"); + } + arg1 = reinterpret_cast<CBM::Config * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } + } + + XS(_wrap_System_init) { { *************** *** 7747,7750 **** --- 8279,8283 ---- static swig_type_info _swigt__p_CBM__Compiler = {"_p_CBM__Compiler", "CBM::Compiler *", 0, 0, (void*)"CBM::Compiler", 0}; static swig_type_info _swigt__p_CBM__CompilerSelector = {"_p_CBM__CompilerSelector", "CBM::CompilerSelector *", 0, 0, (void*)"CBM::CompilerSelector", 0}; + static swig_type_info _swigt__p_CBM__Config = {"_p_CBM__Config", "CBM::Config *", 0, 0, (void*)"CBM::Config", 0}; static swig_type_info _swigt__p_CBM__Package = {"_p_CBM__Package", "CBM::Package *", 0, 0, (void*)"CBM::Package", 0}; static swig_type_info _swigt__p_CBM__System = {"_p_CBM__System", "CBM::System *", 0, 0, (void*)"CBM::System", 0}; *************** *** 7764,7767 **** --- 8297,8301 ---- &_swigt__p_CBM__Compiler, &_swigt__p_CBM__CompilerSelector, + &_swigt__p_CBM__Config, &_swigt__p_CBM__Package, &_swigt__p_CBM__System, *************** *** 7781,7784 **** --- 8315,8319 ---- static swig_cast_info _swigc__p_CBM__Compiler[] = { {&_swigt__p_CBM__Compiler, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CBM__CompilerSelector[] = { {&_swigt__p_CBM__CompilerSelector, 0, 0, 0},{0, 0, 0, 0}}; + static swig_cast_info _swigc__p_CBM__Config[] = { {&_swigt__p_CBM__Config, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CBM__Package[] = { {&_swigt__p_CBM__Package, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CBM__System[] = { {&_swigt__p_CBM__System, 0, 0, 0},{0, 0, 0, 0}}; *************** *** 7798,7801 **** --- 8333,8337 ---- _swigc__p_CBM__Compiler, _swigc__p_CBM__CompilerSelector, + _swigc__p_CBM__Config, _swigc__p_CBM__Package, _swigc__p_CBM__System, *************** *** 7875,7878 **** --- 8411,8415 ---- {"CBMc::Benchmark_Comments", _wrap_Benchmark_Comments}, {"CBMc::Benchmark_Bench", _wrap_Benchmark_Bench}, + {"CBMc::Benchmark_executionTime", _wrap_Benchmark_executionTime}, {"CBMc::delete_Benchmark", _wrap_delete_Benchmark}, {"CBMc::new_XMLAttribute", _wrap_new_XMLAttribute}, *************** *** 7880,7883 **** --- 8417,8421 ---- {"CBMc::XMLAttribute_Value", _wrap_XMLAttribute_Value}, {"CBMc::XMLAttribute_setValue", _wrap_XMLAttribute_setValue}, + {"CBMc::XMLAttribute_append", _wrap_XMLAttribute_append}, {"CBMc::delete_XMLAttribute", _wrap_delete_XMLAttribute}, {"CBMc::new_XMLNode", _wrap_new_XMLNode}, *************** *** 7885,7888 **** --- 8423,8427 ---- {"CBMc::XMLNode_Value", _wrap_XMLNode_Value}, {"CBMc::XMLNode_setValue", _wrap_XMLNode_setValue}, + {"CBMc::XMLNode_append", _wrap_XMLNode_append}, {"CBMc::XMLNode_childNumber", _wrap_XMLNode_childNumber}, {"CBMc::XMLNode_getChild", _wrap_XMLNode_getChild}, *************** *** 7897,7900 **** --- 8436,8444 ---- {"CBMc::XMLReader_read", _wrap_XMLReader_read}, {"CBMc::delete_XMLReader", _wrap_delete_XMLReader}, + {"CBMc::new_Config", _wrap_new_Config}, + {"CBMc::Config_getStatus", _wrap_Config_getStatus}, + {"CBMc::Config_setStatus", _wrap_Config_setStatus}, + {"CBMc::Config_str", _wrap_Config_str}, + {"CBMc::delete_Config", _wrap_delete_Config}, {"CBMc::System_init", _wrap_System_init}, {"CBMc::System_hostid", _wrap_System_hostid}, *************** *** 8275,8278 **** --- 8819,8828 ---- SWIG_TypeClientData(SWIGTYPE_p_CBM__XMLReader, (void*) "CBM::XMLReader"); /*@SWIG:%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "H_XMLCONFIG", TRUE | 0x2); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(1))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_CBM__Config, (void*) "CBM::Config"); + /*@SWIG:%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "System_Root", TRUE | 0x2); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(CBM::System::Root))); Index: CBM.i =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM.i,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CBM.i 23 Jan 2007 18:56:28 -0000 1.7 --- CBM.i 24 Jan 2007 19:33:41 -0000 1.8 *************** *** 11,14 **** --- 11,15 ---- #include "Base/XML.h" #include "Base/XMLReader.h" + #include "Base/Config.h" using namespace CBM; %} *************** *** 19,22 **** --- 20,24 ---- %include "Base/XML.h" %include "Base/XMLReader.h" + %include "Base/Config.h" %include "System/System.h" %include "Compiler/Compiler.h" |
From: Frederic T. <xf...@us...> - 2007-01-24 19:33:31
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31675 Modified Files: Makefile.am Log Message: More tests. Directly dependent headers are referenced for module building. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 23 Jan 2007 18:55:22 -0000 1.9 --- Makefile.am 24 Jan 2007 19:33:12 -0000 1.10 *************** *** 14,19 **** libCBM_la_DEPENDENCIES = ../libcompbenchmarks/libcompbenchmarks.la SUBDIRS = t ! INCLUDES = -I$(top_srcdir)/libcompbenchmarks -I$(top_srcdir)/CBM-PI -I.. -I. -I$(top_srcdir) # LDFLAGS = -L../testing/.libs -lcompbenchmarks --- 14,29 ---- libCBM_la_DEPENDENCIES = ../libcompbenchmarks/libcompbenchmarks.la + CBMPI_DEP_H = $(top_srcdir)/libcompbenchmarks/libcompbenchmarks.h \ + $(top_srcdir)/libcompbenchmarks/System/System.h \ + $(top_srcdir)/libcompbenchmarks/Benchmark/Package.h \ + $(top_srcdir)/libcompbenchmarks/Benchmark/Benchmark.h \ + $(top_srcdir)/libcompbenchmarks/Compiler/Compiler.h \ + $(top_srcdir)/libcompbenchmarks/Base/XML.h \ + $(top_srcdir)/libcompbenchmarks/Base/XMLReader.h \ + $(top_srcdir)/libcompbenchmarks/Base/Config.h \ + $(top_srcdir)/CBM-PI/Glue.h + SUBDIRS = t ! # INCLUDES = -I$(top_srcdir)/libcompbenchmarks -I$(top_srcdir)/CBM-PI -I.. -I. -I$(top_srcdir) # LDFLAGS = -L../testing/.libs -lcompbenchmarks *************** *** 27,34 **** inst_pkgdatadir=@datarootdir@/compbenchmarks/@VERSION@/perl ! $(top_srcdir)/CBM-PI/CBM_wrap.cxx: CBM.i swig -c++ $(INCLUDES) -Wall -proxy -perl $< ! $(top_srcdir)/CBM-PI/CBM.pm: CBM.i swig -c++ $(INCLUDES) -Wall -proxy -perl $< --- 37,44 ---- inst_pkgdatadir=@datarootdir@/compbenchmarks/@VERSION@/perl ! $(top_srcdir)/CBM-PI/CBM_wrap.cxx: CBM.i $(CBMPI_DEP_H) swig -c++ $(INCLUDES) -Wall -proxy -perl $< ! $(top_srcdir)/CBM-PI/CBM.pm: CBM.i $(CBMPI_DEP_H) swig -c++ $(INCLUDES) -Wall -proxy -perl $< *************** *** 37,41 **** libCBM_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! INCLUDES = -I $(top_srcdir)/libcompbenchmarks -I/usr/include/libxml2 # !!! $(xml2-config --cflags) # libBase_la_LIBADD = -L/usr/lib -lxml2 # !!! `xml2-config --libs` --- 47,51 ---- libCBM_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! INCLUDES = -I$(top_srcdir)/libcompbenchmarks -I$(top_srcdir) -I/usr/include/libxml2 # !!! $(xml2-config --cflags) # libBase_la_LIBADD = -L/usr/lib -lxml2 # !!! `xml2-config --libs` |
From: Frederic T. <xf...@us...> - 2007-01-23 18:59:11
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7077 Modified Files: XMLReader.cpp Log Message: Banner. Useless variable removed. Index: XMLReader.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XMLReader.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XMLReader.cpp 23 Jan 2007 18:43:45 -0000 1.1 --- XMLReader.cpp 23 Jan 2007 18:59:06 -0000 1.2 *************** *** 1,2 **** --- 1,10 ---- + /* ---------------------------------------------------------------------------- + $Id$ + + This is free software. + For details, see the GNU Public License in the COPYING file, or + Look http://www.fsf.org + ------------------------------------------------------------------------- */ + #include <Base/XMLReader.h> #include <Base/XML.h> *************** *** 22,26 **** xmlChar *tmpcat_n; - xmlChar *buffer; for(cur_n=node; cur_n; cur_n=cur_n->next) { --- 30,33 ---- |
From: Frederic T. <xf...@us...> - 2007-01-23 18:56:33
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6103 Modified Files: CBM.i CBM.pm CBM_wrap.cxx Log Message: libcompbenchmarks moved in a separate directory. libxml2 support. Index: CBM.pm =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CBM.pm 22 Jan 2007 18:17:20 -0000 1.11 --- CBM.pm 23 Jan 2007 18:56:28 -0000 1.12 *************** *** 254,257 **** --- 254,295 ---- + ############# Class : CBM::XMLReader ############## + + package CBM::XMLReader; + use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); + @ISA = qw( CBM ); + %OWNER = (); + %ITERATORS = (); + sub new { + my $pkg = shift; + my $self = CBMc::new_XMLReader(@_); + bless $self, $pkg if defined($self); + } + + *read = *CBMc::XMLReader_read; + sub DESTROY { + return unless $_[0]->isa('HASH'); + my $self = tied(%{$_[0]}); + return unless defined $self; + delete $ITERATORS{$self}; + if (exists $OWNER{$self}) { + CBMc::delete_XMLReader($self); + delete $OWNER{$self}; + } + } + + sub DISOWN { + my $self = shift; + my $ptr = tied(%$self); + delete $OWNER{$ptr}; + } + + sub ACQUIRE { + my $self = shift; + my $ptr = tied(%$self); + $OWNER{$ptr} = 1; + } + + ############# Class : CBM::System ############## *************** *** 402,405 **** --- 440,444 ---- *UO_verbose = *CBMc::UO_verbose; *UO_fatal = *CBMc::UO_fatal; + *H_XMLREADER = *CBMc::H_XMLREADER; my %__cbmSystem_hash; Index: CBM_wrap.cxx =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM_wrap.cxx,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CBM_wrap.cxx 22 Jan 2007 18:17:20 -0000 1.11 --- CBM_wrap.cxx 23 Jan 2007 18:56:28 -0000 1.12 *************** *** 1388,1399 **** #define SWIGTYPE_p_CBM__XMLAttribute swig_types[6] #define SWIGTYPE_p_CBM__XMLNode swig_types[7] ! #define SWIGTYPE_p_Compiler swig_types[8] ! #define SWIGTYPE_p_CompilerOptions swig_types[9] ! #define SWIGTYPE_p_char swig_types[10] ! #define SWIGTYPE_p_std__string swig_types[11] ! #define SWIGTYPE_p_std__vectorTstd__string_t swig_types[12] ! #define SWIGTYPE_p_time_t swig_types[13] ! static swig_type_info *swig_types[15]; ! static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) --- 1388,1400 ---- #define SWIGTYPE_p_CBM__XMLAttribute swig_types[6] #define SWIGTYPE_p_CBM__XMLNode swig_types[7] ! #define SWIGTYPE_p_CBM__XMLReader swig_types[8] ! #define SWIGTYPE_p_Compiler swig_types[9] ! #define SWIGTYPE_p_CompilerOptions swig_types[10] ! #define SWIGTYPE_p_char swig_types[11] ! #define SWIGTYPE_p_std__string swig_types[12] ! #define SWIGTYPE_p_std__vectorTstd__string_t swig_types[13] ! #define SWIGTYPE_p_time_t swig_types[14] ! static swig_type_info *swig_types[16]; ! static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) *************** *** 1470,1473 **** --- 1471,1475 ---- #include "Compiler/Compiler.h" #include "Base/XML.h" + #include "Base/XMLReader.h" using namespace CBM; *************** *** 5718,5721 **** --- 5720,5811 ---- + XS(_wrap_new_XMLReader) { + { + CBM::XMLReader *result = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_XMLReader();"); + } + result = (CBM::XMLReader *)new CBM::XMLReader(); + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CBM__XMLReader, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } + } + + + XS(_wrap_XMLReader_read) { + { + CBM::XMLReader *arg1 = (CBM::XMLReader *) 0 ; + std::string arg2 ; + CBM::XMLNode *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: XMLReader_read(self,filename);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__XMLReader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XMLReader_read" "', argument " "1"" of type '" "CBM::XMLReader *""'"); + } + arg1 = reinterpret_cast<CBM::XMLReader * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "XMLReader_read" "', argument " "2"" of type '" "std::string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = (CBM::XMLNode *)(arg1)->read(arg2); + + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CBM__XMLNode, 0 | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } + } + + + XS(_wrap_delete_XMLReader) { + { + CBM::XMLReader *arg1 = (CBM::XMLReader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_XMLReader(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CBM__XMLReader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_XMLReader" "', argument " "1"" of type '" "CBM::XMLReader *""'"); + } + arg1 = reinterpret_cast<CBM::XMLReader * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } + } + + XS(_wrap_System_init) { { *************** *** 7661,7664 **** --- 7751,7755 ---- static swig_type_info _swigt__p_CBM__XMLAttribute = {"_p_CBM__XMLAttribute", "CBM::XMLAttribute *", 0, 0, (void*)"CBM::XMLAttribute", 0}; static swig_type_info _swigt__p_CBM__XMLNode = {"_p_CBM__XMLNode", "CBM::XMLNode *", 0, 0, (void*)"CBM::XMLNode", 0}; + static swig_type_info _swigt__p_CBM__XMLReader = {"_p_CBM__XMLReader", "CBM::XMLReader *", 0, 0, (void*)"CBM::XMLReader", 0}; static swig_type_info _swigt__p_Compiler = {"_p_Compiler", "Compiler *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CompilerOptions = {"_p_CompilerOptions", "CompilerOptions *", 0, 0, (void*)0, 0}; *************** *** 7677,7680 **** --- 7768,7772 ---- &_swigt__p_CBM__XMLAttribute, &_swigt__p_CBM__XMLNode, + &_swigt__p_CBM__XMLReader, &_swigt__p_Compiler, &_swigt__p_CompilerOptions, *************** *** 7693,7696 **** --- 7785,7789 ---- static swig_cast_info _swigc__p_CBM__XMLAttribute[] = { {&_swigt__p_CBM__XMLAttribute, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CBM__XMLNode[] = { {&_swigt__p_CBM__XMLNode, 0, 0, 0},{0, 0, 0, 0}}; + static swig_cast_info _swigc__p_CBM__XMLReader[] = { {&_swigt__p_CBM__XMLReader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Compiler[] = { {&_swigt__p_Compiler, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CompilerOptions[] = { {&_swigt__p_CompilerOptions, 0, 0, 0},{0, 0, 0, 0}}; *************** *** 7709,7712 **** --- 7802,7806 ---- _swigc__p_CBM__XMLAttribute, _swigc__p_CBM__XMLNode, + _swigc__p_CBM__XMLReader, _swigc__p_Compiler, _swigc__p_CompilerOptions, *************** *** 7800,7803 **** --- 7894,7900 ---- {"CBMc::XMLNode_str", _wrap_XMLNode_str}, {"CBMc::delete_XMLNode", _wrap_delete_XMLNode}, + {"CBMc::new_XMLReader", _wrap_new_XMLReader}, + {"CBMc::XMLReader_read", _wrap_XMLReader_read}, + {"CBMc::delete_XMLReader", _wrap_delete_XMLReader}, {"CBMc::System_init", _wrap_System_init}, {"CBMc::System_hostid", _wrap_System_hostid}, *************** *** 8172,8175 **** --- 8269,8278 ---- SWIG_TypeClientData(SWIGTYPE_p_CBM__XMLNode, (void*) "CBM::XMLNode"); /*@SWIG:%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "H_XMLREADER", TRUE | 0x2); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(1))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_CBM__XMLReader, (void*) "CBM::XMLReader"); + /*@SWIG:%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "System_Root", TRUE | 0x2); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast<int >(CBM::System::Root))); Index: CBM.i =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/CBM.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CBM.i 22 Jan 2007 18:17:20 -0000 1.6 --- CBM.i 23 Jan 2007 18:56:28 -0000 1.7 *************** *** 10,13 **** --- 10,14 ---- #include "Compiler/Compiler.h" #include "Base/XML.h" + #include "Base/XMLReader.h" using namespace CBM; %} *************** *** 17,20 **** --- 18,22 ---- %include "Benchmark/Benchmark.h" %include "Base/XML.h" + %include "Base/XMLReader.h" %include "System/System.h" %include "Compiler/Compiler.h" |
From: Frederic T. <xf...@us...> - 2007-01-23 18:55:25
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5736 Modified Files: Makefile.am Log Message: libcompbenchmarks moved in a separate directory. libxml2 support. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 22 Jan 2007 18:28:22 -0000 1.8 --- Makefile.am 23 Jan 2007 18:55:22 -0000 1.9 *************** *** 37,40 **** --- 37,44 ---- libCBM_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la + INCLUDES = -I $(top_srcdir)/libcompbenchmarks -I/usr/include/libxml2 # !!! $(xml2-config --cflags) + + # libBase_la_LIBADD = -L/usr/lib -lxml2 # !!! `xml2-config --libs` + test: @CBM_PROG_MAKE@ -C t test |
From: Frederic T. <xf...@us...> - 2007-01-23 18:51:14
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3835 Modified Files: Makefile.am Log Message: Changes in test ordering. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 17 Jan 2007 19:14:40 -0000 1.7 --- Makefile.am 23 Jan 2007 18:51:06 -0000 1.8 *************** *** 1,7 **** SUBDIRS = lib reference ! prog_tests = 00-Glue.pl 00-XML.pl \ 00-CBMSystem-public.pl 01-CBMSystem-protected.pl \ 02-CBMSystem-benchs.pl \ 03-CBMCompilerSelector-public.pl --- 1,8 ---- SUBDIRS = lib reference ! prog_tests = 00-Glue.pl \ 00-CBMSystem-public.pl 01-CBMSystem-protected.pl \ 02-CBMSystem-benchs.pl \ + 00-XML.pl \ 03-CBMCompilerSelector-public.pl |
From: Frederic T. <xf...@us...> - 2007-01-23 18:49:39
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3396 Modified Files: 00-XML.pl Log Message: Updated XML regression checks. Index: 00-XML.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/00-XML.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 00-XML.pl 21 Jan 2007 20:47:25 -0000 1.2 --- 00-XML.pl 23 Jan 2007 18:49:36 -0000 1.3 *************** *** 3,9 **** use CBM; ! use Test::Simple tests => 32; my $sys; sub test_str { --- 3,13 ---- use CBM; ! push(@INC, "lib"); ! require "libtest.pl"; ! ! use Test::Simple tests => 36; my $sys; + our $top_srcdir; sub test_str { *************** *** 75,81 **** test_node($root, "root", undef, 0); ! test_str($root, "<root/>\n"); test_node($child, "child", undef, 0); ! test_str($child, "<child/>\n"); $root->add($child); --- 79,85 ---- test_node($root, "root", undef, 0); ! test_str($root, "<root/>"); test_node($child, "child", undef, 0); ! test_str($child, "<child/>"); $root->add($child); *************** *** 83,92 **** ok($child->childNumber() == 0); test_node_eq($child, $root->getChild(0)); ! test_str($root, "<root>\n <child/>\n</root>\n"); $root->setValue("root-value"); test_node($root, "root", "root-value", 1); test_node($child, "child", undef, 0); ! test_str($root, "<root>\n <child/>\n root-value\n</root>\n"); my $att0 = CBM::XMLAttribute->new("att0"); --- 87,96 ---- ok($child->childNumber() == 0); test_node_eq($child, $root->getChild(0)); ! test_str($root, "<root>\n <child/>\n</root>"); $root->setValue("root-value"); test_node($root, "root", "root-value", 1); test_node($child, "child", undef, 0); ! test_str($root, "<root>\n <child/>\n root-value\n</root>"); my $att0 = CBM::XMLAttribute->new("att0"); *************** *** 118,123 **** EOF ; ! ok($root->str() eq $x); } --- 122,142 ---- EOF ; + chomp($x); + ok($root->str() eq $x, "EXPECTED:$x\nEOF\nHAS:" . $root->str() . "\nEOF"); + } ! sub test_xml_files { ! my @files = ('compbenchmarks-0.xml', ! 'compbenchmarks-1.xml'); ! ! foreach(@files) { ! my $X = CBM::XMLReader->new(); ! ok(defined($X), "XMLReader instance for $_"); ! my $fn = "$top_srcdir/reference/$_"; ! my $e = `cat $fn`; ! ! my $H = $X->read($fn); ! ok($H->str() eq $e, "Parsing of $_:\nEXPECTED:$e\nEOF\nHAS*****:" . $H->str() . "\nEOF"); ! } } *************** *** 126,129 **** --- 145,149 ---- test_xml(); test_xml_sample(); + test_xml_files(); $sys->done(); |
From: Frederic T. <xf...@us...> - 2007-01-23 18:48:51
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3036 Modified Files: Makefile.am Added Files: compbenchmarks-0.xml compbenchmarks-1.xml Log Message: New XML files for checks. --- NEW FILE: compbenchmarks-1.xml --- <libcompbenchmarks version="0.5.0"> <paths> <path id="base-directory"> /home/fred/.compbenchmarks </path> <path id="download-directory"> /home/fred/.compbenchmarks/Downloads </path> <path id="extract-directory"> /home/fred/.compbenchmarks/Extracts </path> <path id="compilation-directory"/> context-directory </paths> <benchmarks> <benchmark id="gzip-1c" status="0"/> </benchmarks> </libcompbenchmarks> Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 11 Jan 2007 18:07:29 -0000 1.2 --- Makefile.am 23 Jan 2007 18:48:47 -0000 1.3 *************** *** 1 **** ! dist_noinst_DATA = CBMSystem-copy.data compiler-fake-g++-4.1.1-13 compiler-fake-gcc-4.1.1-13 compiler-fake-tcc-0.9.23 \ No newline at end of file --- 1 ---- ! dist_noinst_DATA = CBMSystem-copy.data compiler-fake-g++-4.1.1-13 compiler-fake-gcc-4.1.1-13 compiler-fake-tcc-0.9.23 compbenchmarks-0.xml compbenchmarks-1.xml \ No newline at end of file --- NEW FILE: compbenchmarks-0.xml --- <libcompbenchmarks version="0.5.0"> <cont> content </cont> <paths> <path id=""/> <path id="x"/> </paths> </libcompbenchmarks> |
From: Frederic T. <xf...@us...> - 2007-01-23 18:46:33
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2213 Modified Files: Makefile.am Log Message: XMLReader added. libxml2 used. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 22 Jan 2007 18:21:05 -0000 1.2 --- Makefile.am 23 Jan 2007 18:46:27 -0000 1.3 *************** *** 10,14 **** noinst_LTLIBRARIES = libBase.la ! sources = XML.cpp md5.cpp libBase_la_SOURCES = $(sources) $(source_sys) --- 10,14 ---- noinst_LTLIBRARIES = libBase.la ! sources = XML.cpp XMLReader.cpp md5.cpp libBase_la_SOURCES = $(sources) $(source_sys) *************** *** 17,20 **** libBaseincludedir = $(includedir)/compbenchmarks/Base ! INCLUDES = -I $(top_srcdir)/libcompbenchmarks # -I /usr/include/w3c-libwww # !!! --- 17,23 ---- libBaseincludedir = $(includedir)/compbenchmarks/Base ! INCLUDES = -I $(top_srcdir)/libcompbenchmarks -I/usr/include/libxml2 # !!! $(xml2-config --cflags) ! ! libBase_la_LIBADD = -L/usr/lib -lxml2 # !!! `xml2-config --libs` ! # -I /usr/include/w3c-libwww # !!! |
From: Frederic T. <xf...@us...> - 2007-01-23 18:44:24
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1436 Modified Files: XML.cpp XML.h Log Message: append(); added. Index: XML.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XML.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XML.h 22 Jan 2007 17:46:29 -0000 1.1 --- XML.h 23 Jan 2007 18:44:18 -0000 1.2 *************** *** 30,34 **** * \param _value Attribute's value (optional) */ XMLAttribute(std::string _name, ! std::string _value = ""); /** Get attribute's name --- 30,34 ---- * \param _value Attribute's value (optional) */ XMLAttribute(std::string _name, ! std::string _value = ""); /** Get attribute's name *************** *** 45,48 **** --- 45,52 ---- virtual void setValue(std::string _value); + /** Append a string to attribute's value + \param _value string to append */ + virtual void append(std::string _value); + /** Destructor */ virtual ~XMLAttribute(); *************** *** 52,55 **** --- 56,60 ---- * Internal representation of an XML node. * \sa XMLAttribute + * \sa XMLReader */ class XMLNode *************** *** 70,74 **** * \param _value Node's value (optional) */ XMLNode(std::string _name, ! std::string _value = ""); /** Get node's name --- 75,79 ---- * \param _value Node's value (optional) */ XMLNode(std::string _name, ! std::string _value = ""); /** Get node's name *************** *** 85,88 **** --- 90,97 ---- virtual void setValue(std::string _value); + /** Append a string to node's value + \param _value string to append */ + virtual void append(std::string _value); + /** Get childs' number * \return number of nodes held by current node Index: XML.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XML.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XML.cpp 22 Jan 2007 17:46:28 -0000 1.1 --- XML.cpp 23 Jan 2007 18:44:18 -0000 1.2 *************** *** 32,35 **** --- 32,40 ---- } + void XMLAttribute::append(std::string _value) + { + value+=_value; + } + XMLAttribute::~XMLAttribute() { *************** *** 65,68 **** --- 70,78 ---- } + void XMLNode::append(std::string _value) + { + value+=_value; + } + int XMLNode::childNumber(void) { *************** *** 141,145 **** if ((!n_child) && (value=="")) { ! result+="/>\n"; return(result); } --- 151,157 ---- if ((!n_child) && (value=="")) { ! result+="/>"; ! if (_indent) ! result+="\n"; return(result); } *************** *** 159,163 **** indent(result, _indent); ! result+="</" + name + ">\n"; } else { if (value!="") { --- 171,177 ---- indent(result, _indent); ! result+="</" + name + ">"; ! if (_indent) ! result+="\n"; } else { if (value!="") { *************** *** 167,171 **** } indent(result, _indent); ! result+="</" + name + ">\n"; } --- 181,187 ---- } indent(result, _indent); ! result+="</" + name + ">"; ! if (_indent) ! result+="\n"; } |