@@ -68,9 +68,7 @@ def pytest_configure(config: pytest.Config):
68
68
# solc-select current does not support ARM linux
69
69
if platform .system ().lower () == "linux" and platform .machine ().lower () == "aarch64" :
70
70
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."
74
72
pytest .exit (error_message , returncode = pytest .ExitCode .USAGE_ERROR )
75
73
76
74
if config .getoption ("verbose" ) > 0 :
@@ -101,17 +99,24 @@ def pytest_configure(config: pytest.Config):
101
99
config .solc_version = solc_version_semver # type: ignore
102
100
103
101
# 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 (
105
106
["solc" , "--version" ],
106
107
stdout = subprocess .PIPE ,
107
108
stderr = subprocess .STDOUT ,
108
109
text = True ,
109
110
check = True ,
110
111
)
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 == "" :
113
118
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.."
115
120
pytest .exit (error_message , returncode = pytest .ExitCode .USAGE_ERROR )
116
121
117
122
0 commit comments