()
| 29 | |
| 30 | # Check if the test itself requires AVX |
| 31 | def TestRequiresAVXSupport(): |
| 32 | exe_path = sys.argv[len(sys.argv) - 1] |
| 33 | json_path = os.path.dirname(os.path.dirname(exe_path)) + '/requirements/' + os.path.basename(exe_path) + '.json' |
| 34 | |
| 35 | try: |
| 36 | with open(json_path) as json_file: |
| 37 | try: |
| 38 | json_data = json.load(json_file) |
| 39 | if not isinstance(json_data, dict): |
| 40 | raise TypeError('JSON data must be a dict') |
| 41 | |
| 42 | if "AVX" in json_data["HostFeatures"]: |
| 43 | return True |
| 44 | except ValueError as ve: |
| 45 | print(f'JSON error: {ve}') |
| 46 | pass |
| 47 | except IOError: |
| 48 | # If we get here, then we don't have a corresponding JSON |
| 49 | # file for the associated test, and can assume there's no |
| 50 | # feature requirements for the test. |
| 51 | pass |
| 52 | return False |
| 53 | |
| 54 | def LoadTestsFile(File): |
| 55 | Dict = {} |
no test coverage detected