[tests] Permit GCC env failure in examples test.
@@ -7,6 +7,8 @@ import sys
import gcc_search
from absl.flags import FLAGS
+from compiler_gym.service import EnvironmentNotSupported
+
def test_gcc_search_smoke_test(capsys):
flags = [
@@ -20,6 +22,8 @@ def test_gcc_search_smoke_test(capsys):
sys.argv = flags
FLAGS.unparse_flags()
FLAGS(flags)
+
+ try:
gcc_search.main(
[
"gcc_search",
@@ -30,3 +34,5 @@ def test_gcc_search_smoke_test(capsys):
)
out, _ = capsys.readouterr()
assert "benchmark://chstone-v0/aes" in out
+ except EnvironmentNotSupported:
+ pass # GCC environment might not be supported
