Thursday, January 22. 2009Installing the XP- Framework Toolset
And here comes the next part about the XP- Framework.
Installing the XP- Framework Toolset on Linux You might wish to read this before if you haven't so far:
1. Introducing the XP- Framework 2. Installing the XP- Framework on Linux The XP- Framework comes with a load of useful tools to make your life easier. For once, there are the so called "Runners", and there is also an assortment of cool features. Using these is rather simple, and again, I will show you a "quick and simple" way of using and installing some cool stuff. Under Linux, installing the toolset is pretty simple, from a shell, simply call the following command from a shell in a path that is included in your PATH variable, for example in ~/bin: wget 'http://xp-framework.net/downloads/releases/bin/setup' -O - | php This will, if successful, output something similar to this: ===> Warnings: !!! No configuration file found - created it for you !!! Please edit [yourpath]/xp.ini ===> XP runners installed to the directory <[yourpath]> Go ahead and edit your xp.ini. Add [path to]/xp/trunk to the line containing use=. Try running xp -v, my output looks like this: XP 5.7.1-dev { PHP 5.2.6-2ubuntu4 & ZE 2.2.0 } @ Linux hades 2.6.27-11-generic #1 SMP Thu Jan 15 11:03:58 UTC 2009 i686 Copyright (c) 2001-2009 the XP group ... If your output looks similar to this... you are ready to continue. Now, let's look at some of the installed tools. The steps we just did installed "xp", "xpcli", "xar", "doclet", "cgen" and "unittest". Let's first have a look at "unittest": Do a cd [path to]repos/xp/trunk/ports/unittest and look at it's contents. You will find a lot of .ini Files used for testing. To "run" a Unit- Test simply type (to test the string section) unittest ./string.ini. This should give you an output like this: (Please note: We are using a current SVN checkout, so some test may fail. We will at a later stage of course use a stable version of the Framework on our production machines. This is covered in an upcoming article). [...........................] OK: 27/27 run (0 skipped), 27 succeeded, 0 failed Memory used: 3584.00 kB (3584.00 kB peak) In this case, everything looks fine. Exactly how Unit testing works within the Framework will be covered in a later article, but this point should get you started if you want to take a look ahead at things. If you want, have a look at the Unit Test features and explore some of the commands in the path you added earlier. Basically, the .ini file defines which classes are loaded to run the tests, strings.ini for example runs [path to]repos/xp/trunk/ports/classes/net/xp_framework/unittest/text/StreamTokenizerTest.class.php. Go have a look at the File to see how a Unit test class could look like. For more information, you can always visit the XP- Framework Website: XP Runners installation There, this is it for this short article. Now, after a final and last article about setting up an appropriate SVN- Layout for a development system, we'll go into depth about different feature sets of the Framework. Again, if you have any comments, don't hesitate to contact me. Trackbacks
Trackback specific URI for this entry
No Trackbacks
|
CategoriesSyndicate This BlogMisc. Stuff |

