sbsv2/raptor/test/smoke_suite/query_cli.py
changeset 625 a1925fb7753a
parent 591 22486c9c7b15
child 674 37ee82a83d43
equal deleted inserted replaced
624:f70b728ea30c 625:a1925fb7753a
    51 	t.mustnotmatch_singleline = [
    51 	t.mustnotmatch_singleline = [
    52 		"<product.*name='arm'.*/>",
    52 		"<product.*name='arm'.*/>",
    53 		"<product.*name='root'.*/>"
    53 		"<product.*name='root'.*/>"
    54 		]
    54 		]
    55 	t.run()
    55 	t.run()
    56 	
    56 
       
    57 	winscwtargets =[ "<targettype name='ani'/>",
       
    58 				"<targettype name='dll'/>",
       
    59 				"<targettype name='exe'/>",
       
    60 				"<targettype name='exexp'/>",
       
    61 				"<targettype name='fsy'/>",
       
    62 				"<targettype name='implib'/>",
       
    63 				"<targettype name='kdll'/>",
       
    64 				"<targettype name='kext'/>",
       
    65 				"<targettype name='klib'/>",
       
    66 				"<targettype name='ldd'/>",
       
    67 				"<targettype name='lib'/>",
       
    68 				"<targettype name='none'/>",
       
    69 				"<targettype name='pdd'/>",
       
    70 				"<targettype name='pdl'/>",
       
    71 				"<targettype name='pdll'/>",
       
    72 				"<targettype name='plugin'/>",
       
    73 				"<targettype name='plugin3'/>",
       
    74 				"<targettype name='stddll'/>",
       
    75 				"<targettype name='stdexe'/>",
       
    76 				"<targettype name='stdlib'/>",
       
    77 				"<targettype name='textnotifier2'/>",
       
    78 				"<targettype name='var'/>"]
       
    79 	armtargets = winscwtargets + [
       
    80 				"<targettype name='kexe'/>",
       
    81 				"<targettype name='var2'/>" ]
       
    82 	tools2targets = [ "<targettype name='exe'/>",
       
    83 					"<targettype name='lib'/>"]
       
    84 
    57 	t.name = "query_cli_config"
    85 	t.name = "query_cli_config"
    58 	t.command = "sbs --query=config[armv5_urel]"
    86 	t.command = "sbs --query=config[armv5_urel]"
    59 	t.mustmatch_singleline = [
    87 	t.mustmatch_singleline = [
    60 		"<sbs version='2\.\d+\.\d+'>",
    88 		"<sbs version='2\.\d+\.\d+'>",
    61 		"fullname='arm\.v5\.urel\.rvct.*'",
    89 		"meaning='arm\.v5\.urel\.rvct.*'",
       
    90 		"<build>",
       
    91 		"<macro name='__SUPPORT_CPP_EXCEPTIONS__'/>",
       
    92 		"<macro name='_UNICODE'/>",
       
    93 		"<macro name='__SYMBIAN32__'/>",
       
    94 		"<macro name='__EPOC32__'/>",
       
    95 		"<macro name='__MARM__'/>",
       
    96 		"<macro name='__EABI__'/>",
       
    97 		"<macro name='__PRODUCT_INCLUDE__' value='\".*epoc32/include/variant/symbian_os.hrh\"'/>",
       
    98 		"<macro name='__MARM_ARMV5__'/>",
       
    99 		"<macro name='__ARMCC_2__'/>",
       
   100 		"<macro name='__ARMCC_2_2__'/>",
       
   101 		"<macro name='NDEBUG'/>",
       
   102 		"<macro name='__ARMCC__'/>",
       
   103 		"<preinclude file='.*/epoc32/include/rvct/rvct.h'/>"
       
   104 		] + armtargets + [
       
   105 		"</build>",
       
   106 		"<metadata>",
    62 		"outputpath='.*/epoc32/release/armv5/urel'",
   107 		"outputpath='.*/epoc32/release/armv5/urel'",
       
   108 		"include path='.*/epoc32/include/variant'",
       
   109 		"include path='.*/epoc32/include'",
       
   110 		"preinclude file='.*/epoc32/include/variant/Symbian_OS.hrh'",
       
   111 		"macro name='SBSV2' value='_____SBSV2'/>",
       
   112 		"macro name='ARMCC' value='_____ARMCC'/>",
       
   113 		"macro name='EPOC32' value='_____EPOC32'/>",
       
   114 		"macro name='MARM' value='_____MARM'/>",
       
   115 		"macro name='EABI' value='_____EABI'/>",
       
   116 		"macro name='GENERIC_MARM' value='_____GENERIC_MARM'/>",
       
   117 		"macro name='MARM_ARMV5' value='_____MARM_ARMV5'/>",
       
   118 		"macro name='ARMCC_2' value='_____ARMCC_2'/>",
       
   119 		"macro name='ARMCC_2_2' value='_____ARMCC_2_2'/>",
       
   120 		"macro name='__GNUC__' value='3'/>",		
       
   121 		"</metadata>",
    63 		"</sbs>"
   122 		"</sbs>"
    64 		]
   123 		]
    65 	t.mustnotmatch_singleline = []
   124 	t.mustnotmatch_singleline = []
    66 	t.run()
   125 	t.run()
    67 	
   126 	
    68 	t.name = "query_cli_config_bv"
   127 	t.name = "query_cli_config_bv"
    69 	t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv"
   128 	t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv"
    70 	t.mustmatch_singleline = [
   129 	t.mustmatch_singleline = [
    71 		"<sbs version='2\.\d+\.\d+'>",
   130 		"<sbs version='2\.\d+\.\d+'>",
    72 		"fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'",
   131 		"meaning='arm\.v5\.urel\.rvct._.\.test_bv_1'",
    73 		"outputpath='.*/epoc32/release/armv5\.one/urel'",
   132 		"outputpath='.*/epoc32/release/armv5\.one/urel'",
    74 		"</sbs>"
   133 		"</sbs>"
    75 		]
   134 		]
    76 	t.mustnotmatch_singleline = []
   135 	t.mustnotmatch_singleline = []
    77 	t.run()
   136 	t.run()
    85 		t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)")
   144 		t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)")
    86 		
   145 		
    87 	t.mustmatch_singleline = [
   146 	t.mustmatch_singleline = [
    88 		"<sbs version='2\.\d+\.\d+'>",
   147 		"<sbs version='2\.\d+\.\d+'>",
    89 		"outputpath='.*/epoc32/release/winscw/urel'",
   148 		"outputpath='.*/epoc32/release/winscw/urel'",
    90 		"outputpath='.*/epoc32/release/%s/rel'" % t2,
   149 		"outputpath='.*/epoc32/release/%s/rel'" % t2
       
   150 		] + winscwtargets + tools2targets + [
    91 		"</sbs>"
   151 		"</sbs>"
    92 		]
   152 		]
    93 	t.mustnotmatch_singleline = []
   153 	t.mustnotmatch_singleline = []
    94 	t.run()
   154 	t.run()
    95 	
   155 	
   102 		]
   162 		]
   103 	t.mustnotmatch_singleline = []
   163 	t.mustnotmatch_singleline = []
   104 	t.errors = 1
   164 	t.errors = 1
   105 	t.returncode = 1
   165 	t.returncode = 1
   106 	t.run()
   166 	t.run()
       
   167 
       
   168 	t.name = "query_cli_evaluator_error"
       
   169 	t.command = "sbs --query=config[arm.badenv] --configpath=test/smoke_suite/test_resources/query_cli"
       
   170 	t.mustmatch_singleline = [
       
   171 		"<config .*query='arm.badenv'.*>DONTSETTHISEVER is not set in the environment and has no default",
       
   172 		"<config .*meaning='arm.badenv'.*>DONTSETTHISEVER is not set in the environment and has no default"
       
   173 		]
       
   174 	t.mustnotmatch_singleline = []
       
   175 	t.errors = 0
       
   176 	t.returncode = 0
       
   177 	t.run()
   107 	
   178 	
   108 	t.name = "query_cli"
   179 	t.name = "query_cli"
   109 	t.print_result()
   180 	t.print_result()
   110 	return t
   181 	return t