--- a/sbsv2/raptor/test/smoke_suite/filter_params.py Thu Apr 01 11:47:09 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/filter_params.py Thu Apr 01 16:05:35 2010 +0100
@@ -72,6 +72,69 @@
t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]"
t.run()
+
+ # parameters must work with the sbs_filter script as well
+
+ command = "sbs_filter --filters=%s < smoke_suite/test_resources/logexamples/filter_component.log"
+ t.logfileOption = lambda :""
+ t.makefileOption = lambda :""
+
+ # should still work with no parameters
+ t.name = "sbs_filter_no_params"
+ t.command = command % "FilterComp"
+ t.mustmatch_singleline = [
+ ]
+ t.mustnotmatch_singleline = [
+ "[<>]" # no elements should be printed at all as no bld.inf is selected
+ ]
+ t.run()
+
+ # should work with an empty parameter list
+ t.name = "sbs_filter_no_params2"
+ t.command = command % "FilterComp[]"
+ t.run()
+
+ # with a parameter
+ t.name = "sbs_filter_one_param"
+ t.command = command % "FilterComp[email]"
+ t.stdout = [
+ "<error bldinf='y:/src/email/bld.inf'>email error #1</error>",
+ "<error bldinf='y:/src/email/bld.inf'>email error #2</error>",
+ "<warning bldinf='y:/src/email/bld.inf'>email warning #1</warning>",
+ "<warning bldinf='y:/src/email/bld.inf'>email warning #2</warning>",
+ "<whatlog bldinf='y:/src/email/bld.inf' config='armv5_urel' mmp='y:/src/email/a.mmp'>",
+ "<build>/epoc32/data/email_1</build>",
+ "<build>/epoc32/data/email_2</build>",
+ "</whatlog>",
+ "<recipe bldinf='y:/src/email/bld.inf' name='dummy'>",
+ "+ make_email",
+ "email was made fine",
+ "<status exit='ok'></status>",
+ "</recipe>",
+ "<fake bldinf='y:src/email/bld.inf'>",
+ " <foo>",
+ " <bar>",
+ " <fb>fb email</fb>",
+ " </bar>",
+ " </foo>",
+ "</fake>"
+ ]
+ t.mustmatch_singleline = []
+ t.mustnotmatch_singleline = []
+ t.warnings = 2
+ t.errors = 2
+ t.run()
+
+ # with multiple filters
+ t.name = "sbs_filter_multi"
+ t.command = command % "FilterComp[txt],FilterTagCounter[file,recipe]"
+ t.stdout = []
+ t.mustmatch_singleline = [ "txt", "^file \d+", "^recipe \d+" ]
+ t.mustnotmatch_singleline = [ "email" ]
+ t.warnings = 2
+ t.errors = 0
+ t.run()
+
t.name = "filter_params"
t.print_result()
return t