diff --git a/ext/auto-inst/__pycache__/parsing.cpython-310.pyc b/ext/auto-inst/__pycache__/parsing.cpython-310.pyc index 092271590..6e1d3e4c3 100644 Binary files a/ext/auto-inst/__pycache__/parsing.cpython-310.pyc and b/ext/auto-inst/__pycache__/parsing.cpython-310.pyc differ diff --git a/ext/auto-inst/__pycache__/test.cpython-310-pytest-8.3.4.pyc b/ext/auto-inst/__pycache__/test.cpython-310-pytest-8.3.4.pyc index bf345f660..82b12de27 100644 Binary files a/ext/auto-inst/__pycache__/test.cpython-310-pytest-8.3.4.pyc and b/ext/auto-inst/__pycache__/test.cpython-310-pytest-8.3.4.pyc differ diff --git a/ext/auto-inst/test.py b/ext/auto-inst/test.py index eb0c69191..63ef51fae 100644 --- a/ext/auto-inst/test.py +++ b/ext/auto-inst/test.py @@ -21,36 +21,32 @@ def setup_paths(request): def test_llvm(setup_paths): json_file, repo_dir, output_file = setup_paths - # Run the parser (similar to old behavior) result = run_parser(json_file, repo_dir, output_file=output_file) if result is None: - print("WARNING: No instructions found or an error occurred. (Mimic old script warning)") + print("WARNING: No instructions found or an error occurred. ") # You could fail here if this was previously considered a hard error pytest.fail("No output produced by run_parser.") # Check output file content if not os.path.exists(output_file): - print("ERROR: output.txt was not created. (Mimic old script error)") + print("ERROR: output.txt was not created.") pytest.fail("Output file was not created.") with open(output_file, 'r') as f: content = f.read() - # Mimic old behavior: print warnings if no instructions found if "Total Instructions Found: 0" in content: - print("WARNING: No instructions found in output.txt (Mimic old script warning)") + print("WARNING: No instructions found in output.txt ") # Check for encoding differences # In the original script, encoding mismatches were printed like: # "Encodings do not match. Differences:" - # If we find that line, we mimic the old error messages if "Encodings do not match. Differences:" in content: # Extract differences lines lines = content.splitlines() diff_lines = [line for line in lines if line.strip().startswith("-")] - print("ERROR: Encoding differences found! (Mimic old script error)") - pytest.fail("Encodings do not match as per old behavior.") + print("ERROR: Encoding differences found!") + pytest.fail("Encodings do not match.") - # If we reach here, we mimic the old success output - print("No warnings or errors detected. Test passes but mimics old success behavior.") + print("No warnings or errors detected.")