ART: Export ASAN_OPTIONS in build testrunner

This script may be run in an environment that hasn't been setup.
If it runs a sanitized setup, it will trigger leak detection in
ninja. Export ASAN_OPTIONS as envsetup.sh does.

Bug: 31098551
Bug: 37751350
Test: art/test/testrunner/run_build_test_target.py -j50 art-asan
Change-Id: I3035d3f5d3df36ad8e1ad79d81ce15a970b6c604
diff --git a/test/testrunner/target_config.py b/test/testrunner/target_config.py
index 654fb06..baf7600 100644
--- a/test/testrunner/target_config.py
+++ b/test/testrunner/target_config.py
@@ -324,10 +324,14 @@
 
    # ASAN (host) configurations.
 
+   # These configurations need detect_leaks=0 to work in non-setup environments like build bots,
+   # as our build tools leak. b/37751350
+
    'art-gtest-asan': {
         'make' : 'test-art-host-gtest',
         'env': {
-            'SANITIZE_HOST' : 'address'
+            'SANITIZE_HOST' : 'address',
+            'ASAN_OPTIONS' : 'detect_leaks=0'
         }
    },
    'art-asan': {
@@ -335,7 +339,8 @@
                       '--optimizing',
                       '--jit'],
         'env': {
-            'SANITIZE_HOST' : 'address'
+            'SANITIZE_HOST' : 'address',
+            'ASAN_OPTIONS' : 'detect_leaks=0'
         }
    },