diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index a3908642375d3c82d99625b27039ca5c198e4da0..488af3b4da70cbc4cbe16b4ccdb4413550f9831d 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -553,6 +553,7 @@ def _check_arch_option(arch):
     _windows_arch_option(arch)
   elif platform_string() == 'linux':
     # On linux, we need to be running under docker with the right architecture.
+    runtime_arch = platform.architecture()[0]
     if arch == 'default':
       return
     elif runtime_arch == '64bit' and arch == 'x64':