sbsv2/raptor/test/smoke_suite/query_cli.py
branchwip
changeset 504 ea75c3a64a17
parent 502 b4aaa46b1beb
equal deleted inserted replaced
503:e182c2a8794d 504:ea75c3a64a17
    22 	t.description = "Test the --query command-line option"
    22 	t.description = "Test the --query command-line option"
    23 
    23 
    24 	t.name = "query_cli_alias"
    24 	t.name = "query_cli_alias"
    25 	t.command = "sbs --query=aliases"
    25 	t.command = "sbs --query=aliases"
    26 	t.mustmatch_singleline = [
    26 	t.mustmatch_singleline = [
    27 		"<sbs version='2.*'>",
    27 		"<sbs version='2\.\d+\.\d+'>",
    28 		"<alias.*name='armv5_urel'.*/>",
    28 		"<alias.*name='armv5_urel'.*/>",
    29 		"<alias.*name='armv5_udeb'.*/>",
    29 		"<alias.*name='armv5_udeb'.*/>",
    30 		"<alias.*name='winscw_urel'.*/>",
    30 		"<alias.*name='winscw_urel'.*/>",
    31 		"<alias.*name='winscw_udeb'.*/>",
    31 		"<alias.*name='winscw_udeb'.*/>",
    32 		"<alias.*name='tools2_rel'.*/>",
    32 		"<alias.*name='tools2_rel'.*/>",
    40 	t.run()
    40 	t.run()
    41 	
    41 	
    42 	t.name = "query_cli_product"
    42 	t.name = "query_cli_product"
    43 	t.command = "sbs --query=products --configpath=test/smoke_suite/test_resources/bv"
    43 	t.command = "sbs --query=products --configpath=test/smoke_suite/test_resources/bv"
    44 	t.mustmatch_singleline = [
    44 	t.mustmatch_singleline = [
    45 		"<sbs version='2.*'>",
    45 		"<sbs version='2\.\d+\.\d+'>",
    46 		"<product.*name='test_bv_1'.*/>",
    46 		"<product.*name='test_bv_1'.*/>",
    47 		"<product.*name='test_bv_2'.*/>",
    47 		"<product.*name='test_bv_2'.*/>",
    48 		"<product.*name='test_bv_3'.*/>",
    48 		"<product.*name='test_bv_3'.*/>",
    49 		"</sbs>"
    49 		"</sbs>"
    50 		]
    50 		]
    55 	t.run()
    55 	t.run()
    56 	
    56 	
    57 	t.name = "query_cli_config"
    57 	t.name = "query_cli_config"
    58 	t.command = "sbs --query=config[armv5_urel]"
    58 	t.command = "sbs --query=config[armv5_urel]"
    59 	t.mustmatch_singleline = [
    59 	t.mustmatch_singleline = [
    60 		"<sbs version='2.*'>",
    60 		"<sbs version='2\.\d+\.\d+'>",
    61 		"fullname='arm\.v5\.urel\.rvct.*'",
    61 		"fullname='arm\.v5\.urel\.rvct.*'",
    62 		"outputpath='.*/epoc32/release/armv5/urel'",
    62 		"outputpath='.*/epoc32/release/armv5/urel'",
    63 		"</sbs>"
    63 		"</sbs>"
    64 		]
    64 		]
    65 	t.mustnotmatch_singleline = []
    65 	t.mustnotmatch_singleline = []
    66 	t.run()
    66 	t.run()
    67 	
    67 	
    68 	t.name = "query_cli_config_bv"
    68 	t.name = "query_cli_config_bv"
    69 	t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv"
    69 	t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv"
    70 	t.mustmatch_singleline = [
    70 	t.mustmatch_singleline = [
    71 		"<sbs version='2.*'>",
    71 		"<sbs version='2\.\d+\.\d+'>",
    72 		"fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'",
    72 		"fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'",
    73 		"outputpath='.*/epoc32/release/armv5.one/urel'",
    73 		"outputpath='.*/epoc32/release/armv5\.one/urel'",
    74 		"</sbs>"
    74 		"</sbs>"
    75 		]
    75 		]
    76 	t.mustnotmatch_singleline = []
    76 	t.mustnotmatch_singleline = []
    77 	t.run()
    77 	t.run()
    78 	
    78 	
    83 		t2 = "tools2"
    83 		t2 = "tools2"
    84 	else:
    84 	else:
    85 		t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)")
    85 		t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)")
    86 		
    86 		
    87 	t.mustmatch_singleline = [
    87 	t.mustmatch_singleline = [
    88 		"<sbs version='2.*'>",
    88 		"<sbs version='2\.\d+\.\d+'>",
    89 		"outputpath='.*/epoc32/release/winscw/urel'",
    89 		"outputpath='.*/epoc32/release/winscw/urel'",
    90 		"outputpath='.*/epoc32/release/%s/rel'" % t2,
    90 		"outputpath='.*/epoc32/release/%s/rel'" % t2,
    91 		"</sbs>"
    91 		"</sbs>"
    92 		]
    92 		]
    93 	t.mustnotmatch_singleline = []
    93 	t.mustnotmatch_singleline = []
    94 	t.run()
    94 	t.run()
    95 	
    95 	
    96 	t.name = "query_cli_bad"
    96 	t.name = "query_cli_bad"
    97 	t.command = "sbs --query=nonsense"
    97 	t.command = "sbs --query=nonsense"
    98 	t.mustmatch_singleline = [
    98 	t.mustmatch_singleline = [
    99 		"<sbs version='2.*'>",
    99 		"<sbs version='2\.\d+\.\d+'>",
   100 		"exception 'unknown query' with query 'nonsense'",
   100 		"exception 'unknown query' with query 'nonsense'",
   101 		"</sbs>"
   101 		"</sbs>"
   102 		]
   102 		]
   103 	t.mustnotmatch_singleline = []
   103 	t.mustnotmatch_singleline = []
   104 	t.errors = 1
   104 	t.errors = 1