mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[android] Push test binaries w/o modifying executable name. (#19960)
At least test_rth.swift is checking the name of the executable during the test, so renaming every executable to __executable in Android will never work. Also, during the rth tool execution, all the results from before and after are pushed for every test. Since Android copies the passed files without relative paths, the library files will overwrite each other, making the test fail. Depends on #19949 (more or less)
This commit is contained in:
committed by
Jordan Rose
parent
42772922e0
commit
d3e5af6f18
@@ -90,9 +90,12 @@ def execute_on_device(executable_path, executable_arguments):
|
||||
uuid_dir = '{}/{}'.format(DEVICE_TEMP_DIR, str(uuid.uuid4())[:10])
|
||||
shell(['mkdir', '-p', uuid_dir])
|
||||
|
||||
# `adb` can only handle commands under a certain length. No matter what the
|
||||
# original executable's name, on device we call it `__executable`.
|
||||
executable = '{}/__executable'.format(uuid_dir)
|
||||
# `adb` can only handle commands under a certain length. That's why we
|
||||
# hide the arguments and piping/status in executable files. However, at
|
||||
# least one resilience test relies on checking the executable name, so we
|
||||
# need to use the same name as the one provided.
|
||||
executable_name = os.path.basename(executable_path)
|
||||
executable = '{}/{}'.format(uuid_dir, executable_name)
|
||||
push(executable_path, executable)
|
||||
|
||||
child_environment = ['{}="{}"'.format(k.replace(ENV_PREFIX, '', 1), v)
|
||||
|
||||
Reference in New Issue
Block a user