@@ -68,9 +68,7 @@ def pytest_configure(config: pytest.Config):
6868 # solc-select current does not support ARM linux
6969 if platform .system ().lower () == "linux" and platform .machine ().lower () == "aarch64" :
7070 error_message = f"Version { version } does not match solc_version { solc_version } \
71- and since solc-select currently does not support ARM linux you must manually do the following: \
72- Build solc from source, and manually move the binary to\
73- .venv/.solc-select/artifacts/solc-x.y.z/solc-x.y.z, then run 'uv run solc-select use <x.y.z>'."
71+ and since solc-select currently does not support ARM linux we can not recover from this problem."
7472 pytest .exit (error_message , returncode = pytest .ExitCode .USAGE_ERROR )
7573
7674 if config .getoption ("verbose" ) > 0 :
@@ -101,17 +99,24 @@ def pytest_configure(config: pytest.Config):
10199 config .solc_version = solc_version_semver # type: ignore
102100
103101 # test whether solc_version matches actual one
104- solc_version_check_result = subprocess .run (
102+ # using subprocess because that's how yul is compiled in
103+ # ./src/ethereum_test_specs/static_state/common/compile_yul.py
104+ expected_solc_version_string : str = str (solc_version_semver )
105+ actual_solc_version = subprocess .run (
105106 ["solc" , "--version" ],
106107 stdout = subprocess .PIPE ,
107108 stderr = subprocess .STDOUT ,
108109 text = True ,
109110 check = True ,
110111 )
111- solc_version_check_result_string = solc_version_check_result .stdout
112- if str (solc_version_semver ) not in solc_version_check_result_string :
112+ actual_solc_version_string = actual_solc_version .stdout
113+ # use only look at first 10 chars to pass e.g.
114+ # actual: 0.8.25+commit.b61c2a91.Linux.g++ should pass with expected: "0.8.25+commit.b61c2a91
115+ if (
116+ expected_solc_version_string [:10 ] not in actual_solc_version_string
117+ ) or expected_solc_version_string == "" :
113118 error_message = f"Expected solc version { solc_version_semver } but detected a\
114- different solc version:\n { solc_version_check_result_string } \n Critical error, aborting.."
119+ different solc version:\n { actual_solc_version_string } \n Critical error, aborting.."
115120 pytest .exit (error_message , returncode = pytest .ExitCode .USAGE_ERROR )
116121
117122
0 commit comments