support both option -v and TORCH_MLIR_TEST_VERBOSE (#3511)

so that we could run `python3 -m e2e_testing.main -v` to specify
`verbose=True`
pull/3513/head
Yuanqiang Liu 2024-06-29 10:43:31 +08:00 committed by GitHub
parent 3915db0a86
commit 73ba09c587
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -361,7 +361,7 @@ def run_tests(
try:
env_verbose = os.getenv("TORCH_MLIR_TEST_VERBOSE", "0")
if env_verbose is not None:
verbose = bool(int(env_verbose))
verbose = verbose or bool(int(env_verbose))
except ValueError as e:
raise ValueError(
"Bad value for TORCH_MLIR_TEST_VERBOSE env var: " "Expected integer."