NS/releases/valve/source/stlport/test/regression/ReadMe.MPW

357 lines
13 KiB
Text
Raw Normal View History

# MPW adaptation of STLport
#
# written by Tsutomu Yoshida, Minokamo, Japan. Aug/14/1998
# #*TY 05/23/1999 - updated for STLport-3.2
# #*TY 08/03/1999 - updated for STLport-3.2.1
# #*TY 05/21/2000 - updated for STLport-4.0
# #*TY 05/13/2001 - updated for STLport-4.1
#
# this document describes the detailed instructions for building and running the STL testsuite (regression and eh)
# as the mpw tools, as well as building STLportLib which provides the standard conforming iostream.
# *** IMPORTANT NOTES ON ENVIRONMENT CONFIGURATION
#
# <09> STLport under MPW expects CIncludes folder (or alias of it) be presented at the same level as "stlport" folder.
# <09> C++ Compilers should be given the chance to search include files in "stlport" folder before searching in "CIncludes" folder.
# <09> If you use old style STL header (i.e., map.h, etc.), "stoport:old_hp" folder also has to be added in the include
# search paths (old style headers are not verified to work. use them on your own risk).
# <09> This version of STLport uses <exception> header supplied with the package. <exception> supplied elsewhere is not used,
# unlike the earlier version of STLport.
# <09> You may have to increase the stack size of MPW shell since MrCpp's backend uses a lot of stack space for code optimization.
# Use a shell command shown below.
SetShellSize -s 1280k # relaunch of MPW shell required to take effect
# *** how to setup STL under MPW environment:
# ===============================================================================================================
# (1) run the MPW script shown below to setup the shell variable {STL} to point to the STLport
# directory. to run this script, open this file (ReadMe.MPW) under MPW and select the script block below
# and then press "enter' key (not the 'return' key).
#
# Note: this setup script will install a startup script named "!STL_Folder_SetUp"
# under "{ShellDirectory}Startup Items:" directory.
#
#(# INSTALL (1)
begin
unset STL # to unconditionally re-setup STL variable
if !"{STL}"
Set exit 0
Set temp "{Boot}"
unset STL
if "{active}" =~ /(<28>)<29>1:<3A>/
directory "{<7B>1}:"
set temp "{<7B>1}:::"
(Set temp `ResolveAlias "{temp}stlport:"`)<29>dev:null
end
Loop
If !"`Exists "{temp}stl:_config.h"`"
Alert "The folder you have chosen, <20>'{temp}<7D>', does not appear to be the correct STL folder."<22>
"<22>nPlease choose the main STLport folder (the folder which contains stl_config.h)."
Else
Break
End
Set temp "`(GetFileName "{temp}" -q -d -m "Where is your <20>"STLport<72>" folder?")<29>dev:null`"
exit if !"{temp}"
End
Set -e STL "{temp}"
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.
unset temp
Set exit 1
else
alert "the path to <20>"<22>{STL<54>}<7D>" has been set up as: <20>n'{STL}' .<2E>nMake sure this is up to date."
end
end <20><> "{worksheet}"
#)#
# ===============================================================================================================
# (2) make alias for the CIncludes folder at the same level as 'stlport' folder.
#
#(# INSTALL (2)
begin
SendAE -e "FNDRsali" -t "Finder" -----alis "{CIncludes}:CIncludes" <20>dev:null # create the alias
set alias_ `exists -a "{CIncludes}:"<22>CIncludes<65>` # get the exact name for the alias
duplicate -y "{alias_}" "{STL}:CIncludes" # copy it into the destination
delete -ay "{alias_}" # clean up
end <20><> "{worksheet}"
#)#
# ===============================================================================================================
# (3) OPTIONAL: change the creator of files to MPW, colorize them to Blue and set the default font information
#
# WARNING: THIS STEP IS QUITE TIME CONSUMING
#
#(# INSTALL (3) OPTIONAL
begin
set -e exit 0
if !"{Font}";set -e Font "Monaco";end
if !"{FontSize}";set -e FontSize 9;end
set self_ "{active}"
for f_ in `exists -f <20>
"{stl}"[<5B>.]+ "{stl}"<22>.[hc]<5D> <20>
"{stl}config:"<22>.[hc]<5D> <20>
"{stl}old_hp:"<22>.[hc]<5D> <20>
"{stl}stl:"[<5B>.]+ "{stl}stl:"<22>.[hc]<5D> <20>
"{stl}stl:debug:"<22>.[hc]<5D> <20>
"{stl}stl:wrappers:"<22>.[hc]<5D> <20>
"{stl}wrap_std:"<22>[<5B>.]+ <20>
"{stl}wrap_std:h:"<22>.[hc]<5D> <20>
"{stl}using:"[<5B>.]+ <20>
"{stl}using:h:"<22>.[hc]<5D> <20>
"{stl}:src:"<22>.[hc]<5D> <20>
"{stl}:test:regression:"<22>.[hc]<5D> <20>
"{stl}:test:eh:"<22>.[hc]<5D> <20>
`
SetFile -a l "{f_}"
Open -h -r "{f_}"
Format -l 'C/C++/Objective-C' -f "{Font}" -s "{FontSize}" "{f_}"
Close "{f_}"
SetFile -c 'MPS ' -label 3 -a L "{f_}"
end
for f_ in `exists -f <20>
"{stl}:src:"<22>.mak <20>
"{stl}:test:regression:"<22>.mak <20>
"{stl}:test:eh:"<22>.mak <20>
`
SetFile -a l "{f_}"
Open -h -r "{f_}"
Format -l 'MPW Shell Script' -f "{Font}" -s "{FontSize}" "{f_}"
Close "{f_}"
SetFile -c 'MPS ' -label 4 -a L "{f_}" # blue color
end
open "{self_}"
SetFile -a l "{self_}"
Format -l 'MPW Shell Script' -f "{Font}" -s "{FontSize}" "{self_}"
SetFile -c 'MPS ' -label 6 "{self_}" # sky color
set -e exit 1
end <20><> "{worksheet}"
#)#
# ===============================================================================================================
# (4) build and install PPC version of STLportLib into "{stl}:lib:" folder. Both debugging and non-debugging versions will be built.
#
# target compiler: apple's mpw MrCpp 5.0.0 or better
#
#(# INSTALL (4) PPC STLportLib
begin
set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
save -a # save all files (optional)
directory "{stl}:src:" # setup the working directory
target "{worksheet}"
echo -n "<22>n####### START BUILDING PPC VERSION OF STLportLib LIBRARY ####### "; date -s
unset fullbuild
# set -e fullbuild "-e" # uncomment this line to force full build
for debug_build in '-d DEBUG' ''
make {fullbuild} {debug_build} install -f "{stl}:src:MrCpp.mak" > MrCpp.MakeIt; execute MrCpp.MakeIt
end
echo "Finished building STLportLib (PPC)<29>n"
end <20><> "{worksheet}"
#)#
# ===============================================================================================================
# (5) build and install 68K version of STLportLib into "{stl}:lib:" folder. Both debugging and non-debugging versions will be built.
#
# target compiler: apple's mpw SCpp 8.9.0 or better
#
#(# INSTALL (5) 68K STLportLib
begin
set -e SCpp `which SCpp` # ver.8.9.0 or better is required
save -a # save all files (optional)
directory "{stl}:src:" # setup the working directory
target "{worksheet}"
echo -n "<22>n####### START BUILDING 68K VERSION OF STLportLib LIBRARY ####### "; date -s
unset fullbuild
# set -e fullbuild "-e" # uncomment this line to force full build
set -e other_SCpp_Options "-seg STLPortLib"
for debug_build in '-d DEBUG' ''
make {fullbuild} {debug_build} install -f "{stl}:src:SCpp.mak" > SCpp.MakeIt; execute SCpp.MakeIt
end
unset other_SCpp_Options
echo "Finished building STLportLib (68K)<29>n"
end <20><> "{worksheet}"
#)#
# *** how to try out the regression testsuite (PPC version):
# ===============================================================================================================
# target compiler: apple's mpw MrCpp 5.0.0
#
# (1) run the shell script listed below to compile and link the PPC version of testsuite as the mpw
# tool by selecting it and press enter.
#
#(# PPC (1) Regression Build
begin
set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
save -a # save all files (optional)
directory "{stl}:test:regression:" # setup the working directory
target "{worksheet}"
echo -n "<22>n####### START BUILDING PPC VERSION OF STL REGRESSION TEST SUITE ####### "; date -s
unset other_STL_Options
unset other_MrCpp_Options
unset fullbuild
# set -e fullbuild "-e" # uncomment this line to force full build
unset debug_build
set -e debug_build '-d DEBUG' # uncomment this line to build non-debug version
make -w {fullbuild} {debug_build} Regression_test -f "{stl}:test:regression:MrCpp.mak" > MrCpp.MakeIt
set -e exit 0
execute MrCpp.MakeIt
set -e exit 1
end <20><> "{worksheet}"
#)#
# (2) run the shell script listed below to execute the PPC version of testsuite mpw tool and
# compare the output with the standard "stl_test.exp" output.
#
#(# PPC (2)
set proj "{stl}:test:regression:"
set obj "{proj}.PPC.DBG:"
set Regression_test.PPC.output "{obj}"MrCpp.exp # output to separate file
#set Regression_test.PPC.output "dev:stdout" # output to {worksheet}
directory "{proj}"
target "{worksheet}"
begin
echo 'a string' > "{proj}"stdin # prepare input
echo "###### START: Regression_test.PPC"
"{obj}"Regression_test.PPC < "{proj}"stdin > "{Regression_test.PPC.output}" # run
echo "###### FINISHED: Regression_test.PPC"
end <20><> "{worksheet}"
if "{Regression_test.PPC.output}" != "dev:stdout"
set exit 0
comparefiles "{Regression_test.PPC.output}" "{proj}"stl_test.exp # compare output file
set exit 1
end <20><> "{worksheet}"
#)#
# *** how to try out the EH testsuite (PPC version):
# ===============================================================================================================
# target compiler: apple's mpw MrCpp 5.0.0
#
# (3) run the shell script listed below to compile and link the PPC version of testsuite as the mpw
# tool by selecting it and press enter.
#
# Note: MrCpp and SCpp still can not pass all eh tests. You will get failed assertion when run the test.
#
#(# PPC (3)
begin
set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
save -a # save all files (optional)
directory "{stl}:test:eh:" # setup the working directory
target "{worksheet}"
echo -n "<22>n####### START BUILDING PPC VERSION OF STL EH TEST SUITE ####### "; date -s
unset other_STL_Options
unset other_MrCpp_Options
unset fullbuild
# set -e fullbuild "-e" # uncomment this line to force full build
unset debug_build
# set -e debug_build '-d DEBUG' # debug flavor can not pass the eh test yet.
make -w {fullbuild} {debug_build} EH_test -f "{stl}:test:regression:MrCpp.mak" > MrCpp.MakeIt
set -e exit 0
execute MrCpp.MakeIt
set -e exit 1
end <20><> "{worksheet}"
#)#
# *** how to try out the testsuite (68K version):
# ===============================================================================================================
# target compiler: apple's mpw SCpp 8.9.0
#
# (1) run the shell script listed below to compile and link the 68K version of testsuite as the mpw
# tool by selecting it and press enter.
#
#(# 68K (1)
begin
set SCpp `which SCpp` # ver.8.9.0 or better is required
save -a # save all files (optional)
directory "{stl}:test:regression:" # setup the working directory
target "{worksheet}"
echo -n "<22>n####### START BUILDING 68K VERSION OF STL REGRESSION TEST SUITE ####### "; date -s
unset other_STL_Options
unset other_SCpp_Options
unset fullbuild
# set fullbuild "-e" # uncomment this line to force full build
unset debug_build
set -e debug_build '-d DEBUG' # uncomment this line to build non-debug version
set -e other_SCpp_Options "-model far"
make -w {fullbuild} {debug_build} Regression_test -f "{stl}:test:regression:SCpp.mak" > SCpp.MakeIt
set -e exit 0
execute SCpp.MakeIt
set -e exit 1
unset other_SCpp_Options
end <20><> "{worksheet}"
#)#
# (2) run the shell script listed below to execute the 68K version of testsuite mpw tool and
# compare the output with the standard "stl_test.exp" output.
#
#(# 68K (2)
set -e proj "{stl}:test:regression:"
set -e obj "{proj}.68K.DBG:"
set Regression_test.68K.output "{obj}"SCpp.exp # output to separate file
#set Regression_test.68K.output "dev:stdout" # output to {worksheet}
if "{active}" =~ /(<28>)<29>1:<3A>/
directory "{<7B>1}:" # setup the working directory
end
target "{worksheet}"
begin
echo 'a string' > "{proj}"stdin # prepare input
echo "###### START: Regression_test.68K"
"{obj}"Regression_test.68K < "{proj}"stdin > "{Regression_test.68K.output}" # run
echo "###### FINISHED: Regression_test.68K"
end <20><> "{worksheet}"
if "{Regression_test.68K.output}" != "dev:stdout"
set exit 0
comparefiles "{Regression_test.68K.output}" "{proj}"stl_test.exp # compare output file
set exit 1
end <20><> "{worksheet}"
#)#
# *** how to try out the eh testsuite (68K version):
# ===============================================================================================================
# target compiler: apple's mpw SCpp 8.9.0
#
# (1) run the shell script listed below to compile and link the 68K version of testsuite as the mpw
# tool by selecting it and press enter.
#
# Note: MrCpp and SCpp still can not pass all eh tests. You will get failed assertion when run the test.
#
#(# 68K (1)
begin
set SCpp `which SCpp` # ver.8.9.0 or better is required
save -a # save all files (optional)
directory "{stl}:test:eh:" # setup the working directory
target "{worksheet}"
echo -n "<22>n####### START BUILDING 68K VERSION OF STL EH TEST SUITE ####### "; date -s
unset other_STL_Options
unset other_SCpp_Options
unset fullbuild
# set fullbuild "-e" # uncomment this line to force full build
unset debug_build
set -e debug_build '-d DEBUG'
set -e other_SCpp_Options "-model far"
make -w {fullbuild} {debug_build} EH_test -f "{stl}:test:regression:SCpp.mak" > SCpp.MakeIt
set -e exit 0
execute SCpp.MakeIt
set -e exit 1
end <20><> "{worksheet}"
#)#
# - end of ReadMe.MPW