Exemple #1
0
def run():
    t = SmokeTest()
    t.name = "annofile2log_copy_from_log"
    t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
    command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc {test_file_basename}.anno.bz2 ' \
        ' | python testanno2log.py  >"${{FROMANNO}}" && FROMSTDOUT="`mktemp`"; bzip2 -dc {test_file_basename}.stdout.bz2 > ' \
        '"${{FROMSTDOUT}}" && diff -wB "${{FROMANNO}}" "${{FROMSTDOUT}}"; RET=$? ; rm "${{FROMANNO}}" "${{FROMSTDOUT}}"; exit $RET )'

    t.usebash = True
    t.errors = 0
    t.returncode = 0
    t.exceptions = 0
    t.command = command.format(test_file_basename="scrubbed_ncp_dfs_resource")

    t.run()

    t.name = "annofile2log_new_format_annofile"
    t.description = "test new format of annofile"
    t.usebash = True
    t.errors = 0
    t.returncode = 0
    t.exceptions = 0
    t.command = command.format(
        test_file_basename="scrubbed_ncp_dfs_resource_new")

    t.run()

    t.print_result()
    return t
Exemple #2
0
def run():
	t = SmokeTest()
	t.name = "annofile2log_copy_from_log"
	t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
	command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc {test_file_basename}.anno.bz2 ' \
			  ' | python testanno2log.py  >"${{FROMANNO}}" && FROMSTDOUT="`mktemp`"; bzip2 -dc {test_file_basename}.stdout.bz2 > ' \
			  '"${{FROMSTDOUT}}" && diff -wB "${{FROMANNO}}" "${{FROMSTDOUT}}"; RET=$? ; rm "${{FROMANNO}}" "${{FROMSTDOUT}}"; exit $RET )'
	
	t.usebash = True
	t.errors = 0
	t.returncode = 0
	t.exceptions = 0
	t.command = command.format(test_file_basename = "scrubbed_ncp_dfs_resource") 
	
	t.run()
	
	t.name = "annofile2log_new_format_annofile"
	t.description = "test new format of annofile"
	t.usebash = True
	t.errors = 0
	t.returncode = 0
	t.exceptions = 0
	t.command = command.format(test_file_basename = "scrubbed_ncp_dfs_resource_new") 
	
	t.run()
	
	t.print_result()
	return t
def run():
    t = SmokeTest()
    t.description = "Set of tests for commandline option validation e.g. checking that the specified make engine exists"

    t.usebash = True
    t.errors = 1
    t.returncode = 1
    t.exceptions = 0
    base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f ${SBSLOGFILE} -m ${SBSMAKEFILE}"

    t.id = "42562a"
    t.name = "validate_makeengine_nonexist"
    t.command = base_command + " -e amakeenginethatdoesnotexist"
    t.mustmatch = [
        "Unable to use make engine: 'amakeenginethatdoesnotexist' does not appear to be a make engine - no settings found for it"
    ]

    t.run()

    t.id = "43562b"
    t.mustmatch = [
        "Unable to use make engine: 'arm' is not a build engine \(it's a variant but it does not extend 'make_engine'"
    ]
    t.name = "validate_makeengine_is_a_non_makengine_variant"
    t.command = base_command + " -e arm"
    t.run()

    # aliases can be of the form name='blah' meaning='x.y.z'  i.e. where the alias is for a sequence of variants
    # this tests that we detect that at least one of these variants has make_engine as a parent
    # it is possible for one of them not to and we mustn't bomb-out just because of that
    t.id = "43562c"
    t.mustmatch = []
    t.name = "validate_real_dfs_modded_makeengine_alias"
    t.command = "export HOME=$SBS_HOME/test/custom_options/dfsconfig;  " + base_command + " -e dfstestmake -c arm.v5.urel.gcce4_4_1"
    t.errors = 0
    t.warnings = 0
    t.returncode = 0
    t.run()

    t.id = "43562"
    t.name = "input_validation"
    t.print_result()
    return t
def run():
	t = SmokeTest()
	t.id = "43563"
	t.name = "annofile2log"
	t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
	
	t.usebash = True
	t.errors = 0
	t.returncode = 0
	t.exceptions = 0
	t.command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc scrubbed_ncp_dfs_resource.anno.bz2 | python testanno2log.py  >"${FROMANNO}" && FROMSTDOUT="`mktemp`"; bzip2 -dc scrubbed_ncp_dfs_resource.stdout.bz2 > "${FROMSTDOUT}" && diff -wB "${FROMANNO}" "${FROMSTDOUT}"; RET=$? ; rm "${FROMANNO}" "${FROMSTDOUT}"; exit $RET )'
	
	t.mustmatch_multiline = [ 
		"^ *.?"
                ]


	t.run()

	t.print_result()
	return t
def run():
	t = SmokeTest()
	t.description = "Set of tests for commandline option validation e.g. checking that the specified make engine exists"
	
	
	t.usebash = True
	t.errors = 1
	t.returncode = 1
	t.exceptions = 0
	base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f ${SBSLOGFILE} -m ${SBSMAKEFILE}"
	
	t.id = "42562a"
	t.name = "validate_makeengine_nonexist"
	t.command = base_command + " -e amakeenginethatdoesnotexist"
	t.mustmatch = ["Unable to use make engine: 'amakeenginethatdoesnotexist' does not appear to be a make engine - no settings found for it"]

	t.run()

	t.id = "43562b"
	t.mustmatch = ["Unable to use make engine: 'arm' is not a build engine \(it's a variant but it does not extend 'make_engine'"]
	t.name = "validate_makeengine_is_a_non_makengine_variant"
	t.command = base_command + " -e arm"
	t.run()

	# aliases can be of the form name='blah' meaning='x.y.z'  i.e. where the alias is for a sequence of variants
	# this tests that we detect that at least one of these variants has make_engine as a parent
	# it is possible for one of them not to and we mustn't bomb-out just because of that
	t.id = "43562c"
	t.mustmatch = []
	t.name = "validate_real_dfs_modded_makeengine_alias"
	t.command = "export HOME=$SBS_HOME/test/custom_options/dfsconfig;  " + base_command + " -e dfstestmake -c arm.v5.urel.gcce4_4_1"
	t.errors = 0
	t.warnings = 0
	t.returncode = 0
	t.run()
	
	t.id = "43562"
	t.name = "input_validation"
	t.print_result()
	return t