sbsv2/raptor/test/smoke_suite/filter_params.py
branchwip
changeset 452 80e69f7100f1
parent 451 153129bf777e
equal deleted inserted replaced
451:153129bf777e 452:80e69f7100f1
    70 	# using the same filter with the same parameters is valid too
    70 	# using the same filter with the same parameters is valid too
    71 	t.name = "filter_params_info_clean3"
    71 	t.name = "filter_params_info_clean3"
    72 	t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]"
    72 	t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]"
    73 	t.run()
    73 	t.run()
    74 	
    74 	
       
    75 	
       
    76 	# parameters must work with the sbs_filter script as well
       
    77 	
       
    78 	command = "sbs_filter --filters=%s < smoke_suite/test_resources/logexamples/filter_component.log"
       
    79 	t.logfileOption = lambda :""
       
    80 	t.makefileOption = lambda :""
       
    81 
       
    82 	# should still work with no parameters
       
    83 	t.name = "sbs_filter_no_params"
       
    84 	t.command = command % "FilterComp"
       
    85 	t.mustmatch_singleline = [
       
    86 		]
       
    87 	t.mustnotmatch_singleline = [
       
    88 		"[<>]" # no elements should be printed at all as no bld.inf is selected
       
    89 		]
       
    90 	t.run()
       
    91 	
       
    92 	# should work with an empty parameter list
       
    93 	t.name = "sbs_filter_no_params2"
       
    94 	t.command = command % "FilterComp[]"
       
    95 	t.run()
       
    96 	
       
    97 	# with a parameter
       
    98 	t.name = "sbs_filter_one_param"
       
    99 	t.command = command % "FilterComp[email]"
       
   100 	t.stdout = [
       
   101 		"<error bldinf='y:/src/email/bld.inf'>email error #1</error>",
       
   102 		"<error bldinf='y:/src/email/bld.inf'>email error #2</error>",
       
   103 		"<warning bldinf='y:/src/email/bld.inf'>email warning #1</warning>",
       
   104 		"<warning bldinf='y:/src/email/bld.inf'>email warning #2</warning>",
       
   105 		"<whatlog bldinf='y:/src/email/bld.inf' config='armv5_urel' mmp='y:/src/email/a.mmp'>",
       
   106 		"<build>/epoc32/data/email_1</build>",
       
   107 		"<build>/epoc32/data/email_2</build>",
       
   108 		"</whatlog>",
       
   109 		"<recipe bldinf='y:/src/email/bld.inf' name='dummy'>",
       
   110 		"+ make_email",
       
   111 		"email was made fine",
       
   112 		"<status exit='ok'></status>",
       
   113 		"</recipe>",
       
   114 		"<fake bldinf='y:src/email/bld.inf'>",
       
   115 		"  <foo>",
       
   116 		"   <bar>",
       
   117 		"     <fb>fb email</fb>",
       
   118 		"   </bar>",
       
   119 		" </foo>",
       
   120 		"</fake>"
       
   121 		]
       
   122 	t.mustmatch_singleline = []
       
   123 	t.mustnotmatch_singleline = []
       
   124 	t.warnings = 2
       
   125 	t.errors = 2
       
   126 	t.run()
       
   127 	
       
   128 	# with multiple filters
       
   129 	t.name = "sbs_filter_multi"
       
   130 	t.command = command % "FilterComp[txt],FilterTagCounter[file,recipe]"
       
   131 	t.stdout = []
       
   132 	t.mustmatch_singleline = [ "txt", "^file \d+", "^recipe \d+" ]
       
   133 	t.mustnotmatch_singleline = [ "email" ]
       
   134 	t.warnings = 2
       
   135 	t.errors = 0
       
   136 	t.run()
       
   137 	
    75 	t.name = "filter_params"
   138 	t.name = "filter_params"
    76 	t.print_result()
   139 	t.print_result()
    77 	return t
   140 	return t