comparison gpf/BIN/setup_function_coverage.bat @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 @echo on
2
3 @if (%2)==(%3) (@goto labelusage)
4
5 @echo Clearing previously set variables ...
6 @if exist %srcfiles% (unset srcfiles)
7 @if exist %exe% (unset exe)
8 @if exist %outdir% (unset outdir)
9 @if exist %exedir% (unset exedir)
10 @if exist %mapfile% (unset mapfile)
11 @if exist %methode% (unset method)
12 @if exist %arg1% (unset arg1)
13 @if exist %arg2% (unset arg2)
14 @echo Done
15
16 @set method=FV
17 @set arg1=FV
18 @set arg2=/SC
19 @set rsp=%1
20 @set entry_point=_pei_primitive
21 @set outpath_ext=%2
22
23 call profile_config.bat %3 no_skip %outpath_ext%
24
25 rem set outdir=%outdir%%outpath_ext%
26 rem echo %outdir%
27
28 copy %exedir%%exe%.exe %outdir%
29 copy %mapfile% %outdir%
30
31 unset srcfiles
32
33 @rem not to be used when using an rsp file.
34 @rem for /f %a in (%outdir%%1) do ( @set srcfiles=%srcfiles% /INC %a)
35
36 @rem working
37 @rem PREP /%method% /SF _pei_primitive /OT %outdir%%exe% /OM /EXCALL %srcfiles% %outdir%%exe%
38
39 PREP /%method% /SF %entry_point% /OT %outdir%%exe% /OM /EXCALL @%outdir%%rsp% %outdir%%exe%
40
41 @rem PREP /%method% /AT /STACK 200 /SF function /OT %outdir%%exe% /OM %outdir%%exe%
42 @if errorlevel == 1521 goto label1521
43 @echo ^n
44 @echo You are now ready to start the actual profiling !
45 goto done
46
47
48 @rem Error handling.
49
50 :label1521
51 @echo ////////////////////////////////////////////////////////////////////////
52 @echo ERROR: You have to include some modules (obj) which contains the functions
53 @echo to be profiled. When adding obj files to the list do not use the (0-0)
54 @echo as for line coverage.
55 @echo ////////////////////////////////////////////////////////////////////////
56 @goto done
57
58 :labelusage
59 @echo ^n
60 @echo usage: setup_function_coverage file_list.rsp path_ext ps_name
61 @echo where:
62 @echo ^n
63 @echo -file_list.rsp : text file containing list of files to included or excluded from the profiling.
64 @echo -path_ext : the relative directory path to the entity test files (umts base: \g23m\condat\ms\src\, gprs base :\g23m\condat\ms\).
65 @echo -ps_name : the name of the protocol stack (e.g. umts, gprs, gprs_wap, gprs_bt, teststack).
66 @echo ^n
67 @echo Examples: setup_function_coverage.bat sndcp.rsp doc\test\ gprs
68 @echo setup_function_coverage.bat sndcp.rsp sndcp\test_usm\ umts
69 @echo setup_function_coverage.bat xx_tdc.rsp xx_tdc\ teststack
70 @echo ^n
71 @echo For more information on how to perform the profiling please refer to the user guide: \gpf\doc\test_coverage\8434_521_test_coverage_user_guide.doc
72 @echo ^n
73 @goto done
74
75 :done