|
15 | 15 | logging.basicConfig(level=logging.INFO) |
16 | 16 | logger = logging.getLogger(__name__) |
17 | 17 |
|
18 | | -try: |
19 | | - import tomllib |
20 | | -except ModuleNotFoundError: |
21 | | - import tomli as tomllib |
22 | | - |
23 | 18 |
|
24 | 19 | def build_test_list(): |
25 | 20 | """ |
@@ -138,21 +133,15 @@ def run_tests(args): |
138 | 133 | for config_file in os.listdir(args.config_dir): |
139 | 134 | if config_file.endswith(".toml"): |
140 | 135 | full_path = os.path.join(args.config_dir, config_file) |
141 | | - with open(full_path, "rb") as f: |
142 | | - config = tomllib.load(f) |
143 | | - is_integration_test = config["job"].get( |
144 | | - "use_for_integration_test", False |
145 | | - ) |
146 | | - if is_integration_test: |
147 | | - for test_flavor in integration_tests_flavors[config_file]: |
148 | | - if args.test == "all" or test_flavor.test_name == args.test: |
149 | | - if args.ngpu < test_flavor.ngpu: |
150 | | - logger.info( |
151 | | - f"Skipping test {test_flavor.test_name} that requires {test_flavor.ngpu} gpus," |
152 | | - f" because --ngpu arg is {args.ngpu}" |
153 | | - ) |
154 | | - else: |
155 | | - run_test(test_flavor, full_path, args.output_dir) |
| 136 | + for test_flavor in integration_tests_flavors[config_file]: |
| 137 | + if args.test == "all" or test_flavor.test_name == args.test: |
| 138 | + if args.ngpu < test_flavor.ngpu: |
| 139 | + logger.info( |
| 140 | + f"Skipping test {test_flavor.test_name} that requires {test_flavor.ngpu} gpus," |
| 141 | + f" because --ngpu arg is {args.ngpu}" |
| 142 | + ) |
| 143 | + else: |
| 144 | + run_test(test_flavor, full_path, args.output_dir) |
156 | 145 |
|
157 | 146 |
|
158 | 147 | def main(): |
|
0 commit comments