Added missing flags in run_build_test_target.py
Added --host flag for run-test and replaced test-art-gtest with
test-art-host-gtest to only run tests on host.
With a change in arg parsers, there is no need to put additional
--build-target flag.
For e.g.,
./test/testrunner/run_build_test_target.py art-interpreter -j64
./test/testrunner/run_build_test_target.py -j64 art-interpreter
Both of them will build and run target for art-interprerter.
Test: ./test/testrunner/run_build_test_target.py art-interpreter -j64
./test/testrunner/run_build_test_target.py -j64 art-interpreter
Change-Id: I8e7c108082319a9214905854edefd0abc8343f2a
diff --git a/test/testrunner/run_build_test_target.py b/test/testrunner/run_build_test_target.py
index 0cd1dde..4c519ae 100755
--- a/test/testrunner/run_build_test_target.py
+++ b/test/testrunner/run_build_test_target.py
@@ -14,15 +14,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+"""Build and run go/ab/git_master-art-host target
+
+Provided with a target name, the script setup the environment for
+building the test target by taking config information from
+from target_config.py.
+
+If the target field is defined in the configuration for the target, it
+invokes `make` to build the target, otherwise, it assumes
+that the its is a run-test target, and invokes testrunner.py
+script for building and running the run-tests.
+"""
+
import argparse
import os
import subprocess
+import sys
from target_config import target_config
import env
parser = argparse.ArgumentParser()
-parser.add_argument('--build-target', required=True, dest='build_target')
+parser.add_argument('build_target')
parser.add_argument('-j', default='1', dest='n_threads')
options = parser.parse_args()
@@ -49,6 +62,7 @@
run_test_command += target.get('flags', [])
run_test_command += ['-j', str(n_threads)]
run_test_command += ['-b']
+ run_test_command += ['--host']
run_test_command += ['--verbose']
print run_test_command
diff --git a/test/testrunner/target_config.py b/test/testrunner/target_config.py
index 5387d6a..1af2ae7 100644
--- a/test/testrunner/target_config.py
+++ b/test/testrunner/target_config.py
@@ -51,7 +51,8 @@
'flags': ['--jit',
'--gcstress'],
'env' : {
- 'ART_USE_READ_BARRIER' : 'false'
+ 'ART_USE_READ_BARRIER' : 'false',
+ 'ART_DEFAULT_GC_TYPE' : 'SS'
}
},
'art-read-barrier' : {
@@ -185,20 +186,20 @@
}
},
'art-gtest' : {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env' : {
'ART_USE_READ_BARRIER' : 'true'
}
},
'art-gtest-read-barrier': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env' : {
'ART_USE_READ_BARRIER' : 'true',
'ART_HEAP_POISONING' : 'true'
}
},
'art-gtest-read-barrier-table-lookup': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_USE_READ_BARRIER' : 'true',
'ART_READ_BARRIER_TYPE' : 'TABLELOOKUP',
@@ -206,21 +207,21 @@
}
},
'art-gtest-ss-gc': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_DEFAULT_GC_TYPE' : 'SS',
'ART_USE_READ_BARRIER' : 'false'
}
},
'art-gtest-gss-gc': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env' : {
'ART_DEFAULT_GC_TYPE' : 'GSS',
'ART_USE_READ_BARRIER' : 'false'
}
},
'art-gtest-ss-gc-tlab': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_DEFAULT_GC_TYPE' : 'SS',
'ART_USE_TLAB' : 'true',
@@ -228,13 +229,20 @@
}
},
'art-gtest-gss-gc-tlab': {
- 'target' : 'test-art-gtest',
+ 'target' : 'test-art-host-gtest',
'env': {
'ART_DEFAULT_GC_TYPE' : 'GSS',
'ART_USE_TLAB' : 'true',
'ART_USE_READ_BARRIER' : 'false'
}
},
+ 'art-gtest-debug-gc' : {
+ 'target' : 'test-art-host-gtest',
+ 'env' : {
+ 'ART_TEST_DEBUG_GC' : 'true',
+ 'ART_USE_READ_BARRIER' : 'false'
+ }
+ },
'art-gtest-valgrind32': {
'target' : 'valgrind-test-art-host32',
'env': {