<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Oops, I think git svn ate my commit. I'll revert this and commit the real fix. <br><br></div><div><br>On Apr 24, 2015, at 12:11 AM, James Molloy <<a href="mailto:james@jamesmolloy.co.uk">james@jamesmolloy.co.uk</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi Chris,<br><br>Where was the functional change here? it looks like just whitespace.<br><div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><br><div class="gmail_quote">On Thu, 23 Apr 2015 at 23:59 Chris Matthews <<a href="mailto:cmatthews5@apple.com">cmatthews5@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: cmatthews<br>
Date: Thu Apr 23 17:51:43 2015<br>
New Revision: 235659<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=235659&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=235659&view=rev</a><br>
Log:<br>
Make the score sample type work with reruns.<br>
<br>
Modified:<br>
    lnt/trunk/lnt/tests/nt.py<br>
<br>
Modified: lnt/trunk/lnt/tests/nt.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/nt.py?rev=235659&r1=235658&r2=235659&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/nt.py?rev=235659&r1=235658&r2=235659&view=diff</a><br>
==============================================================================<br>
--- lnt/trunk/lnt/tests/nt.py (original)<br>
+++ lnt/trunk/lnt/tests/nt.py Thu Apr 23 17:51:43 2015<br>
@@ -77,7 +77,7 @@ class TestConfiguration(object):<br>
         self.opts = opts<br>
         self.__dict__.update(opts)<br>
         self.start_time = start_time<br>
-<br>
+<br>
         # Report directory cache.<br>
         self._report_dir = None<br>
         # Compiler interrogation is a lot of work, this will cache it.<br>
@@ -93,7 +93,7 @@ class TestConfiguration(object):<br>
         is either "build" or a timestamped directory based on """<br>
         if self._report_dir is not None:<br>
             return self._report_dir<br>
-<br>
+<br>
         if self.timestamp_build:<br>
             ts = self.start_time.replace(' ','_').replace(':','-')<br>
             build_dir_name = "test-%s" % ts<br>
@@ -397,7 +397,7 @@ class TestConfiguration(object):<br>
                 print "make", name, value<br>
                 make_variables[name] = value<br>
<br>
-<br>
+<br>
         # Set remote execution variables, if used.<br>
         if self.remote:<br>
             # make a copy of args for report, without remote options.<br>
@@ -419,7 +419,7 @@ class TestConfiguration(object):<br>
             make_variables['USE_PERF'] = '1'<br>
<br>
         return make_variables, public_vars<br>
-<br>
+<br>
 ###<br>
<br>
 def scan_for_test_modules(config):<br>
@@ -610,7 +610,7 @@ def execute_nt_tests(test_log, make_vari<br>
 (allow default)<br>
 (debug deny)<br>
<br>
-;; Deny all file writes by default.<br>
+;; Deny all file writes by default.<br>
 (deny file-write*)<br>
<br>
 ;; Deny all network access by default.<br>
@@ -813,7 +813,7 @@ def prepare_build_dir(config, iteration)<br>
     else:<br>
         needs_clean = False<br>
         os.mkdir(build_dir)<br>
-<br>
+<br>
     # Unless not using timestamps, we require the basedir not to exist.<br>
     if needs_clean and config.timestamp_build:<br>
         fatal('refusing to reuse pre-existing build dir %r' % build_dir)<br>
@@ -825,14 +825,14 @@ def update_tools(make_variables, config,<br>
     print >>sys.stderr, '%s: building test-suite tools' % (timestamp(),)<br>
     args = ['make', 'tools']<br>
     args.extend('%s=%s' % (k,v) for k,v in make_variables.items())<br>
-    build_tools_log_path = os.path.join(config.build_dir(iteration),<br>
+    build_tools_log_path = os.path.join(config.build_dir(iteration),<br>
                                         'build-tools.log')<br>
     build_tools_log = open(build_tools_log_path, 'w')<br>
     print >>build_tools_log, '%s: running: %s' % (timestamp(),<br>
                                                   ' '.join('"%s"' % a<br>
                                                            for a in args))<br>
     build_tools_log.flush()<br>
-    res = execute_command(build_tools_log, config.build_dir(iteration),<br>
+    res = execute_command(build_tools_log, config.build_dir(iteration),<br>
                           args, config.report_dir)<br>
     build_tools_log.close()<br>
     if res != 0:<br>
@@ -885,7 +885,7 @@ def copy_missing_makefiles(config, based<br>
 def run_test(nick_prefix, iteration, config):<br>
     print >>sys.stderr, "%s: checking source versions" % (<br>
         timestamp(),)<br>
-<br>
+<br>
     test_suite_source_version = get_source_version(config.test_suite_root)<br>
<br>
     # Compute the make variables.<br>
@@ -929,10 +929,10 @@ def run_test(nick_prefix, iteration, con<br>
     if config.only_test is not None and not config.only_test.startswith("LNTBased"):<br>
         copy_missing_makefiles(config, basedir)<br>
<br>
-    # If running without LLVM, make sure tools are up to date.<br>
+    # If running without LLVM, make sure tools are up to date.<br>
     if config.without_llvm:<br>
         update_tools(make_variables, config, iteration)<br>
-<br>
+<br>
    # Always blow away any existing report.<br>
     build_report_path = config.build_report_path(iteration)<br>
     if os.path.exists(build_report_path):<br>
@@ -1026,7 +1026,7 @@ def run_test(nick_prefix, iteration, con<br>
         machdep_info = machine_info<br>
     else:<br>
         machdep_info = run_info<br>
-<br>
+<br>
     machdep_info['uname'] = capture(["uname","-a"], include_stderr=True).strip()<br>
     machdep_info['name'] = capture(["uname","-n"], include_stderr=True).strip()<br>
<br>
@@ -1178,7 +1178,7 @@ def _execute_test_again(config, test_nam<br>
         "TEST." + config.test_style + ".report")<br>
     result_path =  os.path.join(config.build_dir(None),<br>
         test_path, "Output",<br>
-        test_name + "." + config.test_style + ".report.csv")<br>
+        test_name + "." + config.test_style + ".report.csv")<br>
<br>
     gen_report_template = "{gen} -csv {schema} < {input} > {output}"<br>
     gen_cmd = gen_report_template.format(gen=config.generate_report_script,<br>
@@ -1215,6 +1215,7 @@ LOCAL_EXEC_STATUS = "exec.status"<br>
 # Server results have both status and performance in each entry<br>
 SERVER_COMPILE_RESULT = "compile_time"<br>
 SERVER_EXEC_RESULT = "execution_time"<br>
+SERVER_SCORE_RESULT = "score"<br>
<br>
<br>
 class PastRunData(object):<br>
@@ -1273,14 +1274,14 @@ class PastRunData(object):<br>
<br>
 def _process_reruns(config, server_reply, local_results):<br>
     """Rerun each benchmark which the server reported "changed", N more<br>
-    times.<br>
+    times.<br>
     """<br>
     try:<br>
         server_results = server_reply['test_results'][0]['results']<br>
     except KeyError:<br>
         # Server might send us back an error.<br>
         if server_reply.get('error', None):<br>
-            warning("Server returned an error:" +<br>
+            warning("Server returned an error:" +<br>
                 server_reply['error'])<br>
         fatal("No Server results. Cannot do reruns.")<br>
         logging.fatal()<br>
@@ -1302,7 +1303,7 @@ def _process_reruns(config, server_reply<br>
<br>
         updating_entry = collated_results.get(test_name,<br>
                                                PastRunData(test_name))<br>
-<br>
+<br>
         # Filter out "LNTBased" benchmarks for rerun, they<br>
         # won't work. LNTbased look like nts.module.test<br>
         # So just filter out anything with .<br>
@@ -1325,7 +1326,7 @@ def _process_reruns(config, server_reply<br>
     # Now add on top the server results to any entry we already have.<br>
     for full_name, results_status, perf_status in server_results:<br>
         fields = full_name.split(".")<br>
-        test_name = '.'.join(fields[:-1])<br>
+        test_name = '.'.join(fields[:-1])<br>
         test_type = fields[-1]<br>
<br>
         new_entry = collated_results.get(test_name,  None)<br>
@@ -1337,7 +1338,7 @@ def _process_reruns(config, server_reply<br>
         if SERVER_COMPILE_RESULT in test_type:<br>
             if new_entry.compile_status is None:<br>
                 new_entry.compile_status = results_status<br>
-        elif SERVER_EXEC_RESULT in test_type:<br>
+        elif SERVER_EXEC_RESULT in test_type or SERVER_SCORE_RESULT in test_type:<br>
             if new_entry.execution_status is None:<br>
                 # If the server has not seen the test before, it will return<br>
                 # None for the performance results analysis. In this case we<br>
@@ -1348,7 +1349,7 @@ def _process_reruns(config, server_reply<br>
                     derived_perf_status = perf_status<br>
                 new_entry.execution_status = derived_perf_status<br>
         else:<br>
-            assert False, "Unexpected server result type."<br>
+            assert False, "Unexpected server result type." + test_type<br>
         collated_results[test_name] = new_entry<br>
<br>
     # Double check that all values are there for all tests.<br>
@@ -1729,7 +1730,7 @@ class NTTest(builtintest.BuiltinTest):<br>
<br>
         if opts.cxx_under_test is not None:<br>
             opts.cxx_under_test = resolve_command_path(opts.cxx_under_test)<br>
-<br>
+<br>
         # Always set cxx_under_test, since it may be used as the linker even<br>
         # when not testing C++ code.<br>
         if opts.cxx_under_test is None:<br>
@@ -1785,7 +1786,7 @@ class NTTest(builtintest.BuiltinTest):<br>
                 parser.error('--remote is required with --remote-port')<br>
             if opts.remote_user is not  None:<br>
                 parser.error('--remote is required with --remote-user')<br>
-<br>
+<br>
         # libLTO should exist, if given.<br>
         if opts.liblto_path:<br>
             if not os.path.exists(opts.liblto_path):<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</div></blockquote></body></html>