Example #1
0
def make_preprocessor_should_warn(environment, filename):
    setup_preprocess_environment(environment, filename)

    test = Test(environment, filename)
    preprocess = test.add_step("preprocess", step_preprocess)
    preprocess.add_check(check_no_errors)
    preprocess.add_check(check_retcode_zero)
    preprocess.add_check(create_check_warnings_reference(environment))
    return test
Example #2
0
def make_cmd_should_warn(environment, filename):
    read_cmds(environment, filename)

    test = Test(environment, filename)
    runcompiler = test.add_step("cmd_should_warn", step_runcommand)
    runcompiler.add_check(check_retcode_zero)
    runcompiler.add_check(check_no_errors)
    runcompiler.add_check(create_check_warnings_reference(environment))
    return test
Example #3
0
def make_preprocessor_should_warn(environment, filename):
    setup_preprocess_environment(environment, filename)

    test = Test(environment, filename)
    preprocess = test.add_step("preprocess", step_preprocess)
    preprocess.add_check(check_no_errors)
    preprocess.add_check(check_retcode_zero)
    preprocess.add_check(create_check_warnings_reference(environment))
    return test
Example #4
0
def make_c_should_warn(environment, filename, cflags=" -Wall -W"):
    setup_c_environment(environment, filename)
    environment.cflags += cflags
    parse_embedded_commands_no_check(environment)

    test = Test(environment, filename)
    compile = test.add_step("compile", step_compile_c_syntax_only)
    compile.add_check(check_retcode_zero)
    compile.add_check(check_no_errors)
    compile.add_check(create_check_warnings_reference(environment))
    return test