home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stl2vac.zip / STLport-4_5_3.zip / STLport-4.5.3 / test / regression / ReadMe.MPW < prev    next >
Text File  |  2001-07-05  |  14KB  |  357 lines

  1. #    MPW adaptation of STLport
  2. #    
  3. #    written by Tsutomu Yoshida, Minokamo, Japan. Aug/14/1998
  4. #    #*TY 05/23/1999 - updated for STLport-3.2
  5. #    #*TY 08/03/1999 - updated for STLport-3.2.1
  6. #     #*TY 05/21/2000 - updated for STLport-4.0
  7. #    #*TY 05/13/2001 - updated for STLport-4.1
  8. #    
  9. #    this document describes the detailed instructions for building and running the STL testsuite (regression and eh) 
  10. #    as the mpw tools, as well as building STLportLib which provides the standard conforming iostream.
  11.  
  12.  
  13. #    *** IMPORTANT NOTES ON ENVIRONMENT CONFIGURATION
  14. #
  15. #    Ñ STLport under MPW expects CIncludes folder (or alias of it) be presented at the same level as "stlport" folder.
  16. #    Ñ C++ Compilers should be given the chance to search include files in "stlport" folder before searching in "CIncludes" folder.
  17. #    Ñ If you use old style STL header (i.e., map.h, etc.), "stoport:old_hp" folder also has to be added in the include 
  18. #        search paths (old style headers are not verified to work. use them on your own risk).
  19. #    Ñ This version of STLport uses <exception> header supplied with the package. <exception> supplied elsewhere is not used, 
  20. #        unlike the earlier version of STLport.
  21. #    Ñ You may have to increase the stack size of MPW shell since MrCpp's backend uses a lot of stack space for code optimization. 
  22. #        Use a shell command shown below.
  23.     SetShellSize -s 1280k # relaunch of MPW shell required to take effect
  24.  
  25.  
  26. #    *** how to setup STL under MPW environment:
  27. #    ===============================================================================================================
  28. #    (1) run the MPW script shown below to setup the shell variable {STL} to point to the STLport
  29. #    directory. to run this script, open this file (ReadMe.MPW) under MPW and select the script block below
  30. #    and then press "enter' key (not the 'return' key).
  31. #
  32. #    Note:     this setup script will install a startup script named "!STL_Folder_SetUp" 
  33. #            under "{ShellDirectory}Startup Items:" directory.
  34. #    
  35. #(# INSTALL (1)
  36. begin
  37.     unset STL # to unconditionally re-setup STL variable
  38.     if !"{STL}"
  39.         Set exit 0
  40.         Set temp "{Boot}"
  41.         unset STL
  42.         if "{active}" =~ /(┼)¿1:┼/
  43.             directory "{¿1}:"
  44.             set temp "{¿1}:::"
  45.             (Set temp `ResolveAlias "{temp}stlport:"`)╖dev:null
  46.         end
  47.         Loop
  48.             If  !"`Exists "{temp}stl:_config.h"`"
  49.                 Alert "The folder you have chosen, ╢'{temp}╢', does not appear to be the correct STL folder."╢
  50.                 "╢nPlease choose the main STLport folder (the folder which contains stl_config.h)."
  51.             Else
  52.                 Break
  53.             End
  54.             Set temp "`(GetFileName "{temp}" -q -d -m "Where is your ╢"STLport╢" folder?")│dev:null`"
  55.             exit if !"{temp}"
  56.         End
  57.         Set -e STL "{temp}"
  58.         set STL > "{ShellDirectory}Startup Items:!STL_Folder_SetUp" # save the {STL} setting so that you do not have to run this script every time mpw is booted.
  59.         unset temp
  60.         Set exit 1
  61.     else
  62.         alert "the path to ╢"╢{STL╢}╢" has been set up as: ╢n'{STL}' .╢nMake sure this is up to date."
  63.     end
  64. end ╖╖ "{worksheet}"
  65. #)#
  66.  
  67. #    ===============================================================================================================
  68. #    (2) make alias for the CIncludes folder at the same level as 'stlport' folder.
  69. #
  70. #(# INSTALL (2)
  71. begin
  72.     SendAE -e "FNDRsali" -t "Finder" -----alis "{CIncludes}:CIncludes" ╖dev:null     # create the alias
  73.     set alias_ `exists -a "{CIncludes}:"┼CIncludes┼`                                 # get the exact name for the alias
  74.     duplicate -y "{alias_}" "{STL}:CIncludes"                                         # copy it into the destination
  75.     delete -ay "{alias_}"                                                             # clean up
  76. end ╖╖ "{worksheet}"
  77. #)#
  78.  
  79.  
  80. #    ===============================================================================================================
  81. #    (3) OPTIONAL: change the creator of files to MPW, colorize them to Blue and set the default font information
  82. #
  83. #        WARNING: THIS STEP IS QUITE TIME CONSUMING
  84. #
  85. #(# INSTALL (3) OPTIONAL
  86. begin
  87.     set -e exit 0
  88.     if !"{Font}";set -e Font "Monaco";end
  89.     if !"{FontSize}";set -e FontSize 9;end
  90.     set self_ "{active}"
  91.     for f_ in    `exists -f ╢
  92.                 "{stl}"[┬.]+ "{stl}"┼.[hc]┼ ╢
  93.                 "{stl}config:"┼.[hc]┼ ╢
  94.                 "{stl}old_hp:"┼.[hc]┼ ╢
  95.                 "{stl}stl:"[┬.]+ "{stl}stl:"┼.[hc]┼ ╢
  96.                 "{stl}stl:debug:"┼.[hc]┼ ╢
  97.                 "{stl}stl:wrappers:"┼.[hc]┼ ╢
  98.                 "{stl}wrap_std:"┼[┬.]+ ╢
  99.                 "{stl}wrap_std:h:"┼.[hc]┼ ╢
  100.                 "{stl}using:"[┬.]+ ╢
  101.                 "{stl}using:h:"┼.[hc]┼ ╢
  102.                 "{stl}:src:"┼.[hc]┼ ╢
  103.                 "{stl}:test:regression:"┼.[hc]┼ ╢
  104.                 "{stl}:test:eh:"┼.[hc]┼ ╢
  105.                 `
  106.         SetFile -a l "{f_}"
  107.         Open -h -r "{f_}"
  108.         Format -l 'C/C++/Objective-C'  -f "{Font}" -s "{FontSize}" "{f_}" 
  109.         Close "{f_}"
  110.         SetFile -c 'MPS ' -label 3 -a L "{f_}"
  111.     end
  112.     for f_ in    `exists -f ╢
  113.                 "{stl}:src:"┼.mak ╢
  114.                 "{stl}:test:regression:"┼.mak ╢
  115.                 "{stl}:test:eh:"┼.mak ╢
  116.                 `
  117.         SetFile -a l "{f_}"
  118.         Open -h -r "{f_}"
  119.         Format -l 'MPW Shell Script' -f "{Font}" -s "{FontSize}" "{f_}"
  120.         Close "{f_}"
  121.         SetFile -c 'MPS ' -label 4 -a L "{f_}" # blue color
  122.     end
  123.     open "{self_}"
  124.     SetFile -a l "{self_}"
  125.     Format -l 'MPW Shell Script' -f "{Font}" -s "{FontSize}" "{self_}"
  126.     SetFile -c 'MPS ' -label 6  "{self_}" # sky color
  127.     set -e exit 1
  128. end ╖╖ "{worksheet}"
  129. #)#
  130.  
  131.  
  132. #    ===============================================================================================================
  133. #    (4) build and install PPC version of STLportLib into "{stl}:lib:" folder. Both debugging and non-debugging versions will be built.
  134. #
  135. #    target compiler: apple's mpw MrCpp 5.0.0 or better
  136. #    
  137. #(# INSTALL (4) PPC STLportLib
  138. begin
  139.     set -e MrCpp `which MrCpp`    # ver.5.0.0 or better is required
  140.     save -a                        # save all files (optional)
  141.     directory "{stl}:src:"        # setup the working directory
  142.     target "{worksheet}"
  143.     echo -n "╢n####### START BUILDING PPC VERSION OF STLportLib LIBRARY ####### "; date -s
  144.     unset fullbuild
  145. #    set -e fullbuild "-e"            # uncomment this line to force full build
  146.  
  147.     for debug_build in '-d DEBUG' ''
  148.         make {fullbuild} {debug_build} install -f "{stl}:src:MrCpp.mak" > MrCpp.MakeIt; execute MrCpp.MakeIt
  149.     end
  150.     echo "Finished building STLportLib (PPC)╢n"
  151. end ╖╖ "{worksheet}"
  152. #)#
  153.  
  154.  
  155. #    ===============================================================================================================
  156. #    (5) build and install 68K version of STLportLib into "{stl}:lib:" folder. Both debugging and non-debugging versions will be built.
  157. #
  158. #    target compiler: apple's mpw SCpp 8.9.0 or better
  159. #    
  160. #(# INSTALL (5) 68K STLportLib
  161. begin
  162.     set -e SCpp `which SCpp`    # ver.8.9.0 or better is required
  163.     save -a                        # save all files (optional)
  164.     directory "{stl}:src:"        # setup the working directory
  165.     target "{worksheet}"
  166.     echo -n "╢n####### START BUILDING 68K VERSION OF STLportLib LIBRARY ####### "; date -s
  167.     unset fullbuild
  168. #    set -e fullbuild "-e"            # uncomment this line to force full build
  169.  
  170.     set -e other_SCpp_Options "-seg STLPortLib"
  171.     
  172.     for debug_build in '-d DEBUG' ''
  173.         make {fullbuild} {debug_build} install -f "{stl}:src:SCpp.mak" > SCpp.MakeIt; execute SCpp.MakeIt
  174.     end
  175.     unset other_SCpp_Options
  176.     echo "Finished building STLportLib (68K)╢n"
  177. end ╖╖ "{worksheet}"
  178. #)#
  179.  
  180.  
  181.  
  182.  
  183.  
  184. #    *** how to try out the regression testsuite (PPC version):
  185. #    ===============================================================================================================
  186. #    target compiler: apple's mpw MrCpp 5.0.0
  187. #    
  188. #    (1) run the shell script listed below to compile and link the PPC version of testsuite as the mpw
  189. #    tool by selecting it and press enter.
  190. #
  191. #(# PPC (1) Regression Build
  192. begin
  193.     set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
  194.     save -a                    # save all files (optional)
  195.     directory "{stl}:test:regression:"        # setup the working directory
  196.     target "{worksheet}"
  197.     echo -n "╢n####### START BUILDING PPC VERSION OF STL REGRESSION TEST SUITE ####### "; date -s
  198.     unset other_STL_Options
  199.     unset other_MrCpp_Options
  200.     unset fullbuild
  201. #    set -e fullbuild "-e"            # uncomment this line to force full build
  202.     unset debug_build
  203.     set -e debug_build '-d DEBUG'    # uncomment this line to build non-debug version
  204.     make -w {fullbuild} {debug_build} Regression_test -f "{stl}:test:regression:MrCpp.mak" > MrCpp.MakeIt
  205.     set -e exit 0
  206.     execute MrCpp.MakeIt
  207.     set -e exit 1
  208. end ╖╖ "{worksheet}"
  209. #)#
  210.  
  211.  
  212. #    (2) run the shell script listed below to execute the PPC version of testsuite mpw tool and
  213. #    compare the output with the standard "stl_test.exp" output.
  214. #
  215. #(# PPC (2)
  216.     set proj "{stl}:test:regression:"
  217.     set obj "{proj}.PPC.DBG:"
  218.     set Regression_test.PPC.output "{obj}"MrCpp.exp        # output to separate file
  219.     #set Regression_test.PPC.output "dev:stdout"    # output to {worksheet}
  220.     directory "{proj}"
  221.     target "{worksheet}"
  222.     begin
  223.         echo 'a string' > "{proj}"stdin # prepare input
  224.         echo "###### START:    Regression_test.PPC"
  225.         "{obj}"Regression_test.PPC < "{proj}"stdin > "{Regression_test.PPC.output}"    # run
  226.         echo "###### FINISHED: Regression_test.PPC"
  227.     end ╖╖ "{worksheet}"
  228.     if "{Regression_test.PPC.output}" != "dev:stdout"
  229.         set exit 0
  230.         comparefiles "{Regression_test.PPC.output}" "{proj}"stl_test.exp # compare output file
  231.         set exit 1
  232.     end ╖╖ "{worksheet}"
  233. #)#
  234.  
  235.  
  236. #    *** how to try out the EH testsuite (PPC version):
  237. #    ===============================================================================================================
  238. #    target compiler: apple's mpw MrCpp 5.0.0
  239. #    
  240. #    (3) run the shell script listed below to compile and link the PPC version of testsuite as the mpw
  241. #    tool by selecting it and press enter.
  242. #
  243. #    Note: MrCpp and SCpp still can not pass all eh tests. You will get failed assertion when run the test.
  244. #
  245. #(# PPC (3)
  246. begin
  247.     set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
  248.     save -a                    # save all files (optional)
  249.     directory "{stl}:test:eh:"        # setup the working directory
  250.     target "{worksheet}"
  251.     echo -n "╢n####### START BUILDING PPC VERSION OF STL EH TEST SUITE ####### "; date -s
  252.     unset other_STL_Options
  253.     unset other_MrCpp_Options
  254.     unset fullbuild
  255. #    set -e fullbuild "-e"            # uncomment this line to force full build
  256.     unset debug_build
  257. #    set -e debug_build '-d DEBUG'    # debug flavor can not pass the eh test yet.
  258.     make -w {fullbuild} {debug_build} EH_test -f "{stl}:test:regression:MrCpp.mak" > MrCpp.MakeIt
  259.     set -e exit 0
  260.     execute MrCpp.MakeIt
  261.     set -e exit 1
  262. end ╖╖ "{worksheet}"
  263. #)#
  264.  
  265.  
  266.  
  267.  
  268.  
  269. #    *** how to try out the testsuite (68K version):
  270. #    ===============================================================================================================
  271. #    target compiler: apple's mpw SCpp 8.9.0
  272. #
  273. #    (1) run the shell script listed below to compile and link the 68K version of testsuite as the mpw
  274. #    tool by selecting it and press enter.
  275. #
  276. #(# 68K (1)
  277. begin
  278.     set SCpp `which SCpp` # ver.8.9.0 or better is required
  279.     save -a                    # save all files (optional)
  280.     directory "{stl}:test:regression:"        # setup the working directory
  281.     target "{worksheet}"
  282.     echo -n "╢n####### START BUILDING 68K VERSION OF STL REGRESSION TEST SUITE ####### "; date -s
  283.     unset other_STL_Options
  284.     unset other_SCpp_Options
  285.     unset fullbuild
  286. #        set fullbuild "-e"    # uncomment this line to force full build
  287.     unset debug_build
  288.     set -e debug_build '-d DEBUG'    # uncomment this line to build non-debug version
  289.     set -e other_SCpp_Options "-model far"
  290.     make -w {fullbuild}  {debug_build} Regression_test -f "{stl}:test:regression:SCpp.mak" > SCpp.MakeIt
  291.     set -e exit 0
  292.     execute SCpp.MakeIt
  293.     set -e exit 1
  294.     unset other_SCpp_Options
  295. end ╖╖ "{worksheet}"
  296. #)#
  297.  
  298.  
  299. #    (2) run the shell script listed below to execute the 68K version of testsuite mpw tool and
  300. #    compare the output with the standard "stl_test.exp" output.
  301. #
  302. #(# 68K (2)
  303.     set -e proj "{stl}:test:regression:"
  304.     set -e obj "{proj}.68K.DBG:"
  305.     set Regression_test.68K.output "{obj}"SCpp.exp        # output to separate file
  306.     #set Regression_test.68K.output "dev:stdout"    # output to {worksheet}
  307.     if "{active}" =~ /(┼)¿1:┼/
  308.         directory "{¿1}:"    # setup the working directory
  309.     end
  310.     target "{worksheet}"
  311.     begin
  312.         echo 'a string' > "{proj}"stdin # prepare input
  313.         echo "###### START:    Regression_test.68K"
  314.         "{obj}"Regression_test.68K < "{proj}"stdin > "{Regression_test.68K.output}"    # run
  315.         echo "###### FINISHED: Regression_test.68K"
  316.     end ╖╖ "{worksheet}"
  317.     if "{Regression_test.68K.output}" != "dev:stdout"
  318.         set exit 0
  319.         comparefiles "{Regression_test.68K.output}" "{proj}"stl_test.exp # compare output file
  320.         set exit 1
  321.     end ╖╖ "{worksheet}"
  322. #)#
  323.  
  324.  
  325. #    *** how to try out the eh testsuite (68K version):
  326. #    ===============================================================================================================
  327. #    target compiler: apple's mpw SCpp 8.9.0
  328. #
  329. #    (1) run the shell script listed below to compile and link the 68K version of testsuite as the mpw
  330. #    tool by selecting it and press enter. 
  331. #
  332. #    Note: MrCpp and SCpp still can not pass all eh tests. You will get failed assertion when run the test.
  333. #
  334. #(# 68K (1)
  335. begin
  336.     set SCpp `which SCpp` # ver.8.9.0 or better is required
  337.     save -a                    # save all files (optional)
  338.     directory "{stl}:test:eh:"        # setup the working directory
  339.     target "{worksheet}"
  340.     echo -n "╢n####### START BUILDING 68K VERSION OF STL EH TEST SUITE ####### "; date -s
  341.     unset other_STL_Options
  342.     unset other_SCpp_Options
  343.     unset fullbuild
  344. #        set fullbuild "-e"    # uncomment this line to force full build
  345.     unset debug_build
  346.     set -e debug_build '-d DEBUG'
  347.     set -e other_SCpp_Options "-model far"
  348.     make -w {fullbuild} {debug_build} EH_test -f "{stl}:test:regression:SCpp.mak" > SCpp.MakeIt
  349.     set -e exit 0
  350.     execute SCpp.MakeIt 
  351.     set -e exit 1
  352. end ╖╖ "{worksheet}"
  353. #)#
  354.  
  355.  
  356. # - end of ReadMe.MPW
  357.