Skip to content

Commit 4db2af7

Browse files
committed
Update test.py for python3, fix --gtest.
Test: test.py --host --gtest Test: test.py -b --host --optimizing Change-Id: I5dc707b13089a8b771a6f7c62004925050fd3a0c
1 parent 30d4d2f commit 4db2af7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright 2017, The Android Open Source Project
44
#
@@ -51,7 +51,7 @@
5151
run_test_args.append(arg)
5252

5353
test_runner_cmd = [testrunner] + run_test_args
54-
print test_runner_cmd
54+
print(test_runner_cmd)
5555
if subprocess.call(test_runner_cmd) or options.help_runner:
5656
sys.exit(1)
5757

@@ -62,9 +62,11 @@
6262
if options.target or not options.host:
6363
build_target += ' test-art-target-gtest'
6464

65-
build_command = 'm -j' + str(options.n_threads) + ' ' + build_target
66-
print build_command
65+
build_command = ANDROID_BUILD_TOP + '/build/soong/soong_ui.bash --make-mode'
66+
build_command += ' -j' + str(options.n_threads)
67+
build_command += ' ' + build_target
68+
print(build_command)
6769
if subprocess.call(build_command.split(), cwd=ANDROID_BUILD_TOP):
68-
sys.exit(1)
70+
sys.exit(1)
6971

7072
sys.exit(0)

0 commit comments

Comments
 (0)