[LNT] r237671 - add --exclude-stat-from-submission option to lnt runtest nt.

Chris Matthews chris.matthews at apple.com
Tue May 19 16:24:32 PDT 2015


I followed up with a small test in r237742.  Feel free to add more if you’d like.

> On May 19, 2015, at 1:16 AM, Kristof Beyls <kristof.beyls at arm.com> wrote:
> 
> Author: kbeyls
> Date: Tue May 19 03:16:32 2015
> New Revision: 237671
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=237671&view=rev
> Log:
> add --exclude-stat-from-submission option to lnt runtest nt.
> 
> Modified:
>    lnt/trunk/lnt/tests/nt.py
> 
> Modified: lnt/trunk/lnt/tests/nt.py
> URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/nt.py?rev=237671&r1=237670&r2=237671&view=diff
> ==============================================================================
> --- lnt/trunk/lnt/tests/nt.py (original)
> +++ lnt/trunk/lnt/tests/nt.py Tue May 19 03:16:32 2015
> @@ -658,35 +658,41 @@ def execute_nt_tests(test_log, make_vari
> 
> # Keep a mapping of mangled test names, to the original names in the test-suite.
> TEST_TO_NAME = {}
> -
> +KNOWN_SAMPLE_KEYS = ('compile', 'exec', 'gcc.compile', 'bc.compile', 'llc.compile',
> +                     'llc-beta.compile', 'jit.compile', 'gcc.exec', 'llc.exec',
> +                     'llc-beta.exec', 'jit.exec')
> def load_nt_report_file(report_path, config):
>     # Compute the test samples to report.
>     sample_keys = []
> +    def append_to_sample_keys(tup):
> +        stat = tup[0]
> +        if not tup[0] in config.exclude_stat_from_submission:
> +            sample_keys.append(tup)
>     if config.test_style == "simple":
>         test_namespace = 'nts'
>         time_stat = ''
>         # for now, user time is the unqualified Time stat
>         if config.test_time_stat == "real":
>             time_stat = 'Real_'
> -        sample_keys.append(('compile', 'CC_' + time_stat + 'Time', None, 'CC'))
> -        sample_keys.append(('exec', 'Exec_' + time_stat + 'Time', None, 'Exec'))
> +        append_to_sample_keys(('compile', 'CC_' + time_stat + 'Time', None, 'CC'))
> +        append_to_sample_keys(('exec', 'Exec_' + time_stat + 'Time', None, 'Exec'))
>     else:
>         test_namespace = 'nightlytest'
> -        sample_keys.append(('gcc.compile', 'GCCAS', 'time'))
> -        sample_keys.append(('bc.compile', 'Bytecode', 'size'))
> +        append_to_sample_keys(('gcc.compile', 'GCCAS', 'time'))
> +        append_to_sample_keys(('bc.compile', 'Bytecode', 'size'))
>         if config.test_llc:
> -            sample_keys.append(('llc.compile', 'LLC compile', 'time'))
> +            append_to_sample_keys(('llc.compile', 'LLC compile', 'time'))
>         if config.test_llcbeta:
> -            sample_keys.append(('llc-beta.compile', 'LLC-BETA compile', 'time'))
> +            append_to_sample_keys(('llc-beta.compile', 'LLC-BETA compile', 'time'))
>         if config.test_jit:
> -            sample_keys.append(('jit.compile', 'JIT codegen', 'time'))
> -        sample_keys.append(('gcc.exec', 'GCC', 'time'))
> +            append_to_sample_keys(('jit.compile', 'JIT codegen', 'time'))
> +        append_to_sample_keys(('gcc.exec', 'GCC', 'time'))
>         if config.test_llc:
> -            sample_keys.append(('llc.exec', 'LLC', 'time'))
> +            append_to_sample_keys(('llc.exec', 'LLC', 'time'))
>         if config.test_llcbeta:
> -            sample_keys.append(('llc-beta.exec', 'LLC-BETA', 'time'))
> +            append_to_sample_keys(('llc-beta.exec', 'LLC-BETA', 'time'))
>         if config.test_jit:
> -            sample_keys.append(('jit.exec', 'JIT', 'time'))
> +            append_to_sample_keys(('jit.exec', 'JIT', 'time'))
> 
>     # Load the report file.
>     report_file = open(report_path, 'rb')
> @@ -1655,6 +1661,13 @@ class NTTest(builtintest.BuiltinTest):
>         group.add_option("-v", "--verbose", dest="verbose",
>                          help="show verbose test results",
>                          action="store_true", default=False)
> +        group.add_option("", "--exclude-stat-from-submission", dest="exclude_stat_from_submission",
> +                         help="Do not submit the stat of this type "
> +                             "[%default]",
> +                         action='append',
> +                         choices=KNOWN_SAMPLE_KEYS,
> +                         default=[])
> +        parser.add_option_group(group)
> 
>         (opts, args) = parser.parse_args(args)
>         if len(args) == 0:
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list