File:  [NetBSD Developer Wiki] / wikisrc / tutorials / how_to_run_tet_framework.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Sun Feb 5 07:14:36 2012 UTC (8 years, 9 months ago) by schmonz
Branches: MAIN
CVS tags: HEAD
dos2unix

    1: **Contents**
    2: 
    3: [[!toc levels=2]]
    4: 
    5: #  What TET is 
    6: 
    7: The TETware family of tools are Test Execution Management Systems that takes care of the administration, sequencing, reporting and portability of all of the tests that you develop. Freeing up developers to concentrate on test development and helping testers by providing them with a single, standard, test harness. Enabling you to deliver your software projects on time and across multiple operating systems. They are all available off-the-virtual-shelf. Easily accessed by ftp download. So stop re-inventing the wheel, take the drudge out of test development and use TETware. 
    8: 
    9: #  Reason of this article 
   10: 
   11: There is an artcile describes how to build and run TET framework from scratch. The pkgsrc version has several restrictions: 
   12: 
   13:   * the recent version not available until now 
   14:   * necessary to have the pkgsrc infrastructure 
   15:   * only distributed version of TET is provided 
   16: 
   17: However, you may apply patches from the pkgsrc tree (for example the patch-ad still can be applied for distributed TET). 
   18: 
   19: #  Porting to NetBSD 
   20: 
   21: Current opensourced version is 3.7a. To download or check new versions look to the Links section below. (The guide was tested at least on the NetBSD-current/i386 and NetBSD-current/ARMv6) 
   22: 
   23: #  Patchset 
   24: 
   25: [The simply patch](/images/TET-Configure.diff) would be applied before compilation is started. 
   26: 
   27: #  Prebuild 
   28: 
   29:   * After applying patch you'll need to copy the proper makefile 
   30:     
   31:     cp src/defines/UNTESTED/freebsd.mk src/defines/netbsd.mk
   32:     
   33: 
   34:   * Make the $TET_ROOT directory like _/opt/tet3_
   35:   * Copy content of TET sources tree to $TET_ROOT 
   36: 
   37: **Notice to get distributed TET**: 
   38: 
   39:   * Create regular user _tet_ on the target system with home path as $TET_ROOT without real shell 
   40: 
   41: #  Build 
   42: 
   43:   * Change working directory to $TET_ROOT 
   44:   * Build framework 
   45:     
   46:     ./configure -t <style>
   47:     cd src
   48:     make
   49:     make install
   50:     
   51: 
   52: where <style> means Lite (_-t lite_) or Distributed (_-t inet_) version of TET framework. 
   53: 
   54: **Notice to get distributed TET**: 
   55: 
   56:   * Change owner of the $TET_ROOT to _tet_ recursively 
   57: 
   58: #  Update user's files 
   59: 
   60:   * Put to your ~/.profile 
   61:     
   62:     # TET
   63:     export TET_ROOT="/opt/tet3"
   64:     export PATH=$PATH:$TET_ROOT/bin
   65:     
   66: 
   67: #  System files correction (distributed TET) 
   68: 
   69:   * Start tccd daemon from the /etc/rc.conf 
   70:     
   71:     export TET_ROOT="/opt/tet3"
   72:     if test -x "$TET_ROOT/bin/tccd"
   73:     then
   74:             $TET_ROOT/bin/tccd && echo "TET3 tccd started"
   75:     fi
   76:     
   77: 
   78: Other files (_$TET_ROOT/systems_, _$HOME/systems.equiv_, _/etc/services_) are corrected in according to TET3 install guide. 
   79: 
   80: ##  Sample of required files 
   81: 
   82: You'll need a minimal _$TET_ROOT/systems_ file. The following content in the file is enough for this test suite. 
   83:     
   84:     000 localhost 60103
   85:     
   86: 
   87: For the 'inet' version of TET, you'll need tccd running, and a _$HOME/systems.equiv_ file in the directory of the user running tccd. The following contents will do for this file: 
   88: 
   89: **Note!** In our case the _$HOME_ is equivalent to _/opt/tet3_
   90:     
   91:     localhost
   92:     
   93: 
   94: And you'll need to append following lines to the _/etc/services_: 
   95:     
   96:     tcc             60103/tcp
   97:     tcc             60103/udp
   98:     
   99: 
  100: #  Simple check 
  101: 
  102: The directory _contrib_ in the source tree contains a number of simplest examples of test cases. Let's start something from it step by step. Consider test cases under _contrib/capi_. Login as user _tet_. Be ensure you have set $TET_ROOT to actual path (_/opt/tet3_ in our case) and _$TET_ROOT/bin_ is covered by $PATH. 
  103:     
  104:     $ echo $TET_ROOT
  105:     /opt/tet3
  106:     $ echo $PATH
  107:     /home/andy/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin:/opt/tet3/bin
  108:     
  109: 
  110: Change current directory to _$TET_ROOT/contrib/capi_. 
  111:     
  112:     cd $TET_ROOT/contrib/capi
  113:     
  114: 
  115: Patch test case build system (yeah, I know...): 
  116:     
  117:     --- tools/buildtool.c.orig      2008-11-24 13:15:58.000000000 +0000
  118:     +++ tools/buildtool.c   2008-11-24 13:16:15.000000000 +0000
  119:     @@ -51,7 +51,7 @@
  120:      #define BUILDSUCCESS 0   /* successful return from buildtool */
  121:     
  122:     
  123:     -static void tbuild()
  124:     +void tbuild()
  125:      {
  126:      char command_line[BUFLEN];
  127:      char bres_line[BUFSIZ];
  128:     
  129: 
  130: To run the test suite, firstly apply profile setting, then run the _Setup_ script and after use tcc. 
  131:     
  132:     source profile
  133:     sh ./Setup
  134:     tcc -p -bec contrib/capi
  135:     
  136: 
  137: #  Links 
  138: 
  139:   * [Free TET Framework][15]
  140:   * [Documentation][16]
  141:   * [VSTHlite][17] - pthread test suite 
  142: 
  143:    [15]: http://tetworks.opengroup.org/tet/ (http://tetworks.opengroup.org/tet/)
  144:    [16]: http://tetworks.opengroup.org/documents/docs.htm (http://tetworks.opengroup.org/documents/docs.htm)
  145:    [17]: /VSTHlite (VSTHlite)
  146: 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb