Check the driver query is answered before each wrapper's call sites

This commit is contained in:
maxjivi05 committed 2026-12-03 15:29:10 -05:00
1 parent 19b4844998
commit 17c0af445e
1 file changed
+4 -2
+4 -2
View File
@@ -2621,9 +2621,11 @@ class GameEnvironmentTest(unittest.TestCase):
scripts = (COMPAT["launcher_sh"](), COMPAT["extra_wrapper_sh"]("proton"))
query = "/root/.local/share/Steam/steamrtarm64/../bin/d3ddriverquery64.exe"
probe = "/root/.local/share/Steam/steamapps/compatdata/0"
for script in scripts:
for script, here in zip(scripts, ("$depot", "$here")):
subprocess.run(["bash", "-n"], input=script, text=True, check=True)
self.assertLess(script.index('case "$verb:${1##*/}:'), script.index("dd_components "))
answered = script.index('case "$verb:${1##*/}:')
self.assertLess(answered, script.index('dd_components "%s"' % here))
self.assertLess(answered, script.index('dd_anticheat "$@"'))
for args, prefix in (([query, "-d3d12"], probe), ([query], probe + "/"),
([query.replace("64.exe", ".exe")], probe)):
result = subprocess.run(["bash", "-s", "run"] + args, input=script, text=True, capture_output=True,