| OLD | NEW |
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 from . import commands | 32 from . import commands |
| 33 from . import statusfile | 33 from . import statusfile |
| 34 from . import utils | 34 from . import utils |
| 35 from ..objects import testcase | 35 from ..objects import testcase |
| 36 from variants import ALL_VARIANTS, ALL_VARIANT_FLAGS, FAST_VARIANT_FLAGS | 36 from variants import ALL_VARIANTS, ALL_VARIANT_FLAGS, FAST_VARIANT_FLAGS |
| 37 | 37 |
| 38 | 38 |
| 39 FAST_VARIANTS = set(["default", "turbofan"]) | 39 FAST_VARIANTS = set(["default", "turbofan"]) |
| 40 STANDARD_VARIANT = set(["default"]) | 40 STANDARD_VARIANT = set(["default"]) |
| 41 IGNITION_VARIANT = set(["ignition"]) | |
| 42 | 41 |
| 43 | 42 |
| 44 class VariantGenerator(object): | 43 class VariantGenerator(object): |
| 45 def __init__(self, suite, variants): | 44 def __init__(self, suite, variants): |
| 46 self.suite = suite | 45 self.suite = suite |
| 47 self.all_variants = ALL_VARIANTS & variants | 46 self.all_variants = ALL_VARIANTS & variants |
| 48 self.fast_variants = FAST_VARIANTS & variants | 47 self.fast_variants = FAST_VARIANTS & variants |
| 49 self.standard_variant = STANDARD_VARIANT & variants | 48 self.standard_variant = STANDARD_VARIANT & variants |
| 50 | 49 |
| 51 def FilterVariantsByTest(self, testcase): | 50 def FilterVariantsByTest(self, testcase): |
| 52 result = self.all_variants | 51 result = self.all_variants |
| 53 if testcase.outcomes: | 52 if testcase.outcomes: |
| 54 if statusfile.OnlyStandardVariant(testcase.outcomes): | 53 if statusfile.OnlyStandardVariant(testcase.outcomes): |
| 55 return self.standard_variant | 54 return self.standard_variant |
| 56 if statusfile.OnlyFastVariants(testcase.outcomes): | 55 if statusfile.OnlyFastVariants(testcase.outcomes): |
| 57 result = self.fast_variants | 56 result = self.fast_variants |
| 58 if statusfile.NoIgnitionVariant(testcase.outcomes): | |
| 59 result = result - IGNITION_VARIANT | |
| 60 return result | 57 return result |
| 61 | 58 |
| 62 def GetFlagSets(self, testcase, variant): | 59 def GetFlagSets(self, testcase, variant): |
| 63 if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes): | 60 if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes): |
| 64 return FAST_VARIANT_FLAGS[variant] | 61 return FAST_VARIANT_FLAGS[variant] |
| 65 else: | 62 else: |
| 66 return ALL_VARIANT_FLAGS[variant] | 63 return ALL_VARIANT_FLAGS[variant] |
| 67 | 64 |
| 68 | 65 |
| 69 class TestSuite(object): | 66 class TestSuite(object): |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 return (testcase.flags + ["--gtest_filter=" + testcase.path] + | 348 return (testcase.flags + ["--gtest_filter=" + testcase.path] + |
| 352 ["--gtest_random_seed=%s" % context.random_seed] + | 349 ["--gtest_random_seed=%s" % context.random_seed] + |
| 353 ["--gtest_print_time=0"] + | 350 ["--gtest_print_time=0"] + |
| 354 context.mode_flags) | 351 context.mode_flags) |
| 355 | 352 |
| 356 def _VariantGeneratorFactory(self): | 353 def _VariantGeneratorFactory(self): |
| 357 return StandardVariantGenerator | 354 return StandardVariantGenerator |
| 358 | 355 |
| 359 def shell(self): | 356 def shell(self): |
| 360 return self.name | 357 return self.name |
| OLD | NEW |