Commits

Cameron Hummels committed 0f21409 Merge

Merging.

Comments (0)

Files changed (21)

run/Cooling/CoolingTest_Cloudy/CoolingTest_Cloudy__test_cooling.py

                        find_outputs=True)
     sim.get_time_series()
     tolerance = ytcfg.getint("yt", "answer_testing_tolerance")
-    for pf in sim:
-        for field in _fields:
-            yield FieldValuesTest(pf, field, decimals=tolerance)
+    pf = sim[-1]
+    for field in _fields:
+        yield FieldValuesTest(pf, field, decimals=tolerance)
 

run/Cooling/CoolingTest_JHW/CoolingTest_JHW__test_cooling.py

                        find_outputs=True)
     sim.get_time_series()
     tolerance = ytcfg.getint("yt", "answer_testing_tolerance")
-    for pf in sim:
-        for field in _fields:
-            yield FieldValuesTest(pf, field, decimals=tolerance)
+    pf = sim[-1]
+    for field in _fields:
+        yield FieldValuesTest(pf, field, decimals=tolerance)
 

run/Cooling/OneZoneFreefallTest/OneZoneFreefallTest__test_freefall.py

                        find_outputs=True)
     sim.get_time_series()
     tolerance = ytcfg.getint("yt", "answer_testing_tolerance")
-    for pf in sim:
-        for field in _fields:
-            yield FieldValuesTest(pf, field, decimals=tolerance)
+    pf = sim[-1]
+    for field in _fields:
+        yield FieldValuesTest(pf, field, decimals=tolerance)

run/GravitySolver/TestOrbit/TestOrbit__test_orbit.py

                        find_outputs=True)
     sim.get_time_series()
     tolerance = ytcfg.getint("yt", "answer_testing_tolerance")
-    for pf in sim:
-        for field in _fields:
-            yield AllFieldValuesTest(pf, field, decimals=tolerance)
+    pf = sim[-1]
+    for field in _fields:
+        yield AllFieldValuesTest(pf, field, decimals=tolerance)

run/Hydro/Hydro-1D/FreeExpansion/FreeExpansion__test_free_expansion.py

     sim = sim_dir_load(_pf_name, path=_dir_name, 
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        yield TestFreeExpansionDistance(pf)
+    pf = sim[-1]
+    yield TestFreeExpansionDistance(pf)

run/Hydro/Hydro-2D/FreeExpansionAMR/FreeExpansionAMR__test_free_expansion.py

     sim = sim_dir_load(_pf_name, path=_dir_name, 
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        yield TestFreeExpansionDistance(pf)
+    pf = sim[-1]
+    yield TestFreeExpansionDistance(pf)

run/Hydro/Hydro-2D/NohProblem2D/NohProblem2D__test_noh2d.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        yield TestShockImage(pf)
-        yield TestRadialDensity(pf)
+    pf = sim[-1]
+    yield TestShockImage(pf)
+    yield TestRadialDensity(pf)

run/Hydro/Hydro-2D/NohProblem2DAMR/NohProblem2DAMR__test_noh2damr.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        yield TestShockImage(pf)
-        yield TestRadialDensity(pf)
+    pf = sim[-1]
+    yield TestShockImage(pf)
+    yield TestRadialDensity(pf)

run/Hydro/Hydro-3D/NohProblem3D/NohProblem3D__test_noh3d.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        yield TestShockImage(pf)
-        yield TestRadialDensity(pf)
+    pf = sim[-1]
+    yield TestShockImage(pf)
+    yield TestRadialDensity(pf)

run/Hydro/Hydro-3D/NohProblem3DAMR/NohProblem3DAMR__test_noh3damr.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        yield TestShockImage(pf)
-        yield TestRadialDensity(pf)
+    pf = sim[-1]
+    yield TestShockImage(pf)
+    yield TestRadialDensity(pf)

run/Hydro/Hydro-3D/ProtostellarCollapse_Std/ProtostellarCollapse_Std.enzotest

 gravity = True
 dimensionality = 3
 max_time_minutes = 3
-fullsuite = True
-pushsuite = True
-quicksuite = True
+fullsuite = False
+pushsuite = False
+quicksuite = False

run/Hydro/Hydro-3D/RotatingCylinder/RotatingCylinder__test_rotating_cylinder.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        yield TestLVariation(pf)
+    pf = sim[-1]
+    yield TestLVariation(pf)

run/MHD/1D/BrioWu-MHD-1D/BrioWu-MHD-1D__test_briowu.py

                        find_outputs=True)
     sim.get_time_series()
     tolerance = ytcfg.getint("yt", "answer_testing_tolerance")
-    for pf in sim:
-        for field in _fields:
-            yield AllFieldValuesTest(pf, field, decimals=tolerance)
+    pf = sim[-1]
+    for field in _fields:
+        yield AllFieldValuesTest(pf, field, decimals=tolerance)

run/MHD/2D/MHD2DRotorTest/MHD2DRotorTest.enzotest

 gravity = False
 AMR = True
 dimensionality = 2
-max_time_minutes = 2
+max_time_minutes = 2.5
 fullsuite = True
 pushsuite = True
 quicksuite = True

run/MHD/2D/MHD2DRotorTest/MHD2DRotorTest__test_rotor.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        for field in _fields:
-            yield TestRotorImage(pf, field)
+    pf = sim[-1]
+    for field in _fields:
+        yield TestRotorImage(pf, field)

run/MHD/2D/SedovBlast-MHD-2D-Fryxell/SedovBlast-MHD-2D-Fryxell__test_fryxell.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        for field in _fields:
-            yield TestFryxellImage(pf, field)
+    pf = sim[-1]
+    for field in _fields:
+        yield TestFryxellImage(pf, field)

run/MHD/2D/SedovBlast-MHD-2D-Gardiner/SedovBlast-MHD-2D-Gardiner__test_gardiner.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        for field in _fields:
-            yield TestGardinerImage(pf, field)
+    pf = sim[-1]
+    for field in _fields:
+        yield TestGardinerImage(pf, field)

run/RadiationTransport/PhotonShadowing/PhotonShadowing__test_photonshadowing.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        for field in _fields:
-            yield TestPhotonShadowing(pf, field)
+    pf = sim[-1]
+    for field in _fields:
+        yield TestPhotonShadowing(pf, field)

run/RadiationTransport/PhotonTest/PhotonTest__test_photontest.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        for field in _fields:
-            yield TestPhotonTest(pf, field)
+    pf = sim[-1]
+    for field in _fields:
+        yield TestPhotonTest(pf, field)

run/RadiationTransport/PhotonTestAMR/PhotonTestAMR__test_amrphotontest.py

     sim = sim_dir_load(_pf_name, path=_dir_name,
                        find_outputs=True)
     sim.get_time_series()
-    for pf in sim:
-        for field in _fields:
-            yield TestAMRPhotonTest(pf, field)
+    pf = sim[-1]
+    for field in _fields:
+        yield TestAMRPhotonTest(pf, field)

run/test_runner.py

 
             outfile.write('Tests that failed:\n')
             for fail in self.failures: 
-                outfile.write(fail)
-                outfile.write('\n')
+                for li, line in enumerate(fail.split('\\n')):
+                    if li > 0: outfile.write('    ')
+                    outfile.write(line)
+                    outfile.write('\n')
             outfile.write('\n')
 
             outfile.write('Tests that errored:\n')
             for err in self.errors: 
-                outfile.write(err)
-                outfile.write('\n')
+                for li, line in enumerate(err.split('\\n')):
+                    if li > 0: outfile.write('    ')
+                    outfile.write(line)
+                    outfile.write('\n')
             outfile.write('\n')
 
 class EnzoTestCollection(object):
         go_start_time = time.time()
         self.output_dir = output_dir
         total_tests = len(self.tests)
+
+        # copy executable to top of testing directory
+        shutil.copy(exe_path, output_dir)
+        exe_path = os.path.join(output_dir, os.path.basename(exe_path))
+        
         if interleaved:
             for i, my_test in enumerate(self.tests):
                 print "Preparing test: %s." % my_test['name']
         dnfs = default_test = 0
         f = open(os.path.join(self.output_dir, results_filename), 'w')
         self.plugins[1].finalize(None, outfile=f)
-        # for my_test in self.test_container:
-        #     default_only = False
-        #     if my_test.run_finished:
-        #         if my_test.test_data['answer_testing_script'] == 'None' or \
-        #                 my_test.test_data['answer_testing_script'] is None:
-        #             default_only = True
-        #             default_test += 1
-        #         t_passes = 0
-        #         t_failures = 0
-        #         for t_result in my_test.results.values():
-        #             t_passes += int(t_result)
-        #             t_failures += int(not t_result)
-        #         f.write("%-70sPassed: %4d, Failed: %4d" % (my_test.test_data['fulldir'], 
-        #                                                    t_passes, t_failures))
-        #         if default_only:
-        #             f.write(" (default tests).\n")
-        #         else:
-        #             f.write(".\n")
-        #         all_passes += t_passes
-        #         all_failures += t_failures
-        #         run_passes += int(not (t_failures > 0))
-        #         run_failures += int(t_failures > 0)
-        #     else:
-        #         dnfs += 1
-        #         f.write("%-70sDID NOT FINISH\n" % my_test.test_data['fulldir'])
-
-        # f.write("\n")
-        # f.write("%-70sPassed: %4d, Failed: %4d.\n" % ("Total", 
-        #                                               all_passes, all_failures))
-        # f.write("Runs finished with all tests passed: %d.\n" % run_passes)
-        # f.write("Runs finished with at least one failure: %d.\n" % run_failures)
-        # f.write("Runs failed to complete: %d.\n" % dnfs)
-        # f.write("Runs finished with only default tests available: %d.\n" % default_test)
         f.close()
         if all_failures > 0 or dnfs > 0:
             self.any_failures = True
     parser.add_option("--run-suffix", dest="run_suffix", default=None, metavar='str',
                       help="An optional suffix to append to the test run directory. Useful to distinguish multiple runs of a given changeset.")
     parser.add_option("", "--bitwise",
-                      dest="bitwise", default=False, action="store_true", 
+                      dest="bitwise", default=None, action="store_true", 
                       help="run bitwise comparison of fields? (trumps strict)")
     parser.add_option("", "--tolerance",
                       dest="tolerance", default=None, metavar='int',
     suite_vars = [suite+"suite" for suite in all_suites]
     testproblem_group = optparse.OptionGroup(parser, "Test problem selection options")
     testproblem_group.add_option("", "--suite",
-                                 dest="test_suite", default="quick",
+                                 dest="test_suite", default=unknown,
                                  help="quick: 37 tests in ~15 minutes, push: 48 tests in ~60 minutes, full: 96 tests in ~60 hours.",
                                  choices=all_suites, metavar=all_suites)
 
             if val == 'None': val = None
             if val == "False": val = False
             construct_selection[var] = caster(val)
+    # if no selection criteria given, run the quick suite
+    if not construct_selection:
+        construct_selection['quicksuite'] = True
     print
     print "Selecting with:"
     for k, v in sorted(construct_selection.items()):
     # different ways on different systems.  There are 'test_almost_standard"s
     # in Zeldovichs's directories which are just like standard without x-vel 
     # field comparisons, which is why we leave them out here.
+    # Same with MHD2DRotorTest
     ignore_list = ('GravityTest', 'ProtostellarCollapse_Std',
                    'ZeldovichPancake', 'AMRZeldovichPancake',
                    'MHD2DRotorTest')