Merge "Test par file argument handling"

This commit is contained in:
Treehugger Robot 2019-12-05 16:23:56 +00:00 committed by Gerrit Code Review
commit bed70f837b
2 changed files with 11 additions and 0 deletions

View file

@ -44,6 +44,13 @@ assert_equal("sys.path[0]", sys.path[0], archive)
assert_equal("sys.path[1]", sys.path[1], os.path.join(archive, "internal"))
assert_equal("sys.path[2]", sys.path[2], os.path.join(archive, "internal", "stdlib"))
if os.getenv('ARGTEST', False):
assert_equal("len(sys.argv)", len(sys.argv), 3)
assert_equal("sys.argv[1]", sys.argv[1], "--arg1")
assert_equal("sys.argv[2]", sys.argv[2], "arg2")
else:
assert_equal("len(sys.argv)", len(sys.argv), 1)
if failed:
sys.exit(1)

View file

@ -36,8 +36,12 @@ PYTHONHOME= PYTHONPATH= $ANDROID_HOST_OUT/nativetest64/par_test/par_test
PYTHONHOME=/usr $ANDROID_HOST_OUT/nativetest64/par_test/par_test
PYTHONPATH=/usr $ANDROID_HOST_OUT/nativetest64/par_test/par_test
ARGTEST=true $ANDROID_HOST_OUT/nativetest64/par_test/par_test --arg1 arg2
PYTHONHOME= PYTHONPATH= $ANDROID_HOST_OUT/nativetest64/par_test3/par_test3
PYTHONHOME=/usr $ANDROID_HOST_OUT/nativetest64/par_test3/par_test3
PYTHONPATH=/usr $ANDROID_HOST_OUT/nativetest64/par_test3/par_test3
ARGTEST=true $ANDROID_HOST_OUT/nativetest64/par_test3/par_test3 --arg1 arg2
echo "Passed!"