Fix test failure by reducing max shm size to 32 MB

Tests are failing on travis because the max allowed SHM size
was set to 2GB. Lowering down to 32 MB.
Also fixing the emulator scripts for mac.

Bug: 73625175
Change-Id: Ia6c3e6df38674c1e4a6723ae87589efe1605c257
diff --git a/tools/run_android_emulator b/tools/run_android_emulator
index 4f6d151..3a4121a 100755
--- a/tools/run_android_emulator
+++ b/tools/run_android_emulator
@@ -26,9 +26,16 @@
   args = parser.parse_args()
 
   root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-  emulator_root = os.path.join(
-    root_dir, 'buildtools', 'emulator', 'linux-x86_64')
-  emulator_path = os.path.join(emulator_root, 'qemu', 'linux-x86_64')
+
+  if sys.platform.startswith('linux'):
+    emulator_root = os.path.join(
+      root_dir, 'buildtools', 'emulator', 'linux-x86_64')
+    emulator_path = os.path.join(emulator_root, 'qemu', 'linux-x86_64')
+  else:
+    emulator_root = os.path.join(
+      root_dir, 'buildtools', 'emulator', 'darwin-x86_64')
+    emulator_path = os.path.join(emulator_root, 'qemu', 'darwin-x86_64')
+
   aosp_path = os.path.join(root_dir, 'buildtools', 'aosp-arm')
 
   env = {
@@ -36,6 +43,7 @@
       # 32-bit mode with a "Cannot decide host bitness because $SHELL" error.
       'SHELL': '/bin/bash',
       'LD_LIBRARY_PATH': os.path.join(emulator_root, 'lib64', 'qt', 'lib'),
+      'DYLD_LIBRARY_PATH': os.path.join(emulator_root, 'lib64', 'qt', 'lib'),
   }
   emulator_bin = os.path.join(emulator_path, 'qemu-system-armel')
   emulator_args = ['-no-window', '-no-snapshot',  '-gpu', 'off', '-no-accel',