sbsv2/raptor/test/smoke_suite/toolcheck.py
changeset 713 7b7f0409fc00
parent 674 37ee82a83d43
equal deleted inserted replaced
712:df89378e9223 713:7b7f0409fc00
    18 from raptor_tests import SmokeTest
    18 from raptor_tests import SmokeTest
    19 
    19 
    20 def run():
    20 def run():
    21 	t = SmokeTest()
    21 	t = SmokeTest()
    22 	t.id = "0092a"
    22 	t.id = "0092a"
    23 	t.name = "toolcheck"
       
    24 	t.description = """Test toolcheck works properly, with 3 options: on, off and forced. 
    23 	t.description = """Test toolcheck works properly, with 3 options: on, off and forced. 
    25 				TOOL1 3 4 and 5 are expected to fail and 2 to pass"""
    24 				TOOL1 3 4 and 5 are expected to fail and 2 to pass"""
    26 	result = SmokeTest.PASS
    25 	result = SmokeTest.PASS
    27 	toolcheckDir = os.environ["SBS_HOME"].replace("\\","/") + "/test/smoke_suite/test_resources/toolcheck"
    26 	toolcheckDir = os.environ["SBS_HOME"].replace("\\","/") + "/test/smoke_suite/test_resources/toolcheck"
    28 
    27 
    29 	# toolcheck ON
    28 	# toolcheck ON
       
    29 	t.name = "toolcheck_on"
    30 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
    30 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
    31 			" -c default.toolcheck --toolcheck=on"
    31 			" -c default.toolcheck --toolcheck=on"
    32 	
    32 	
    33 	t.mustmatch = [
    33 	t.mustmatch = [
    34 		".*tool 'TOOLCHECK1' from config 'none' did not return version.*",
    34 		".*tool 'TOOLCHECK1' from config 'none' did not return version.*",
    38 		]
    38 		]
    39 	t.mustnotmatch = [
    39 	t.mustnotmatch = [
    40 		".*TOOLCHECK2.*",
    40 		".*TOOLCHECK2.*",
    41 		".*TOOLCHECK6.*"
    41 		".*TOOLCHECK6.*"
    42 		]
    42 		]
    43 	t.errors = 4
    43 	t.errors = 7
    44 	t.returncode = 1
    44 	t.returncode = 1
    45 	t.run()
    45 	t.run()
    46 	if t.result == SmokeTest.FAIL:
    46 	if t.result == SmokeTest.FAIL:
    47 		result = SmokeTest.FAIL
    47 		result = SmokeTest.FAIL
    48 
    48 
       
    49 	t.name = "toolcheck_off"
    49 	# toolcheck OFF
    50 	# toolcheck OFF
    50 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
    51 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
    51 			" -c default.toolcheck --toolcheck=off"
    52 			" -c default.toolcheck --toolcheck=off"
    52 
    53 
    53 	t.id = "0092b"
    54 	t.id = "0092b"
    64 	t.run()
    65 	t.run()
    65 	if t.result == SmokeTest.FAIL:
    66 	if t.result == SmokeTest.FAIL:
    66 		result = SmokeTest.FAIL
    67 		result = SmokeTest.FAIL
    67 
    68 
    68 	# force toolcheck
    69 	# force toolcheck
       
    70 	t.name = "toolcheck_force"
    69 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
    71 	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \
    70 			" -c default.toolcheck --toolcheck=forced"
    72 			" -c default.toolcheck --toolcheck=forced"
    71 
    73 
    72 	t.id = "0092c"
    74 	t.id = "0092c"
    73 	t.mustmatch = [
    75 	t.mustmatch = [
    78 		]
    80 		]
    79 	t.mustnotmatch = [
    81 	t.mustnotmatch = [
    80 		".*TOOLCHECK2.*",
    82 		".*TOOLCHECK2.*",
    81 		".*TOOLCHECK6.*"
    83 		".*TOOLCHECK6.*"
    82 	]
    84 	]
    83 	t.errors = 4
    85 	t.errors = 16
    84 	t.returncode = 1
    86 	t.returncode = 1
    85 	t.run()
    87 	t.run()
    86 	if t.result == SmokeTest.FAIL:
    88 	if t.result == SmokeTest.FAIL:
    87 		result = SmokeTest.FAIL
    89 		result = SmokeTest.FAIL
    88 
    90