Skip to content

Commit

Permalink
Merge pull request #40977 from buttaface/droid-test
Browse files Browse the repository at this point in the history
  • Loading branch information
CodaFi authored Feb 22, 2022
2 parents beda891 + 26aafe6 commit 496da9d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/Android.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ $ utils/build-script \
--android \ # Build for Android.
--android-ndk ~/android-ndk-r23b \ # Path to an Android NDK.
--android-arch armv7 \ # Optionally specify Android architecture, alternately aarch64
--android-ndk-version 21
--android-api-level 21
```
3 changes: 0 additions & 3 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1438,9 +1438,6 @@ elif (run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'openbsd', 'windows-
config.target_shared_library_prefix = 'lib'
config.target_shared_library_suffix = ".so"
config.target_sdk_name = "android"
# Needed by several ParseableInterface/swift_build_sdk_interfaces tests on
# Android
config.environment['ANDROID_DATA'] = os.environ['ANDROID_DATA']
config.target_cc_options = "-fPIE"
else:
lit_config.note("Testing Linux " + config.variant_triple)
Expand Down
6 changes: 0 additions & 6 deletions test/stdlib/POSIX.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,7 @@ POSIXTests.test("fcntl(CInt, CInt, UnsafeMutableRawPointer): locking and unlocki
// Lock for reading...
var flck = flock()
flck.l_type = Int16(F_RDLCK)
#if os(Android)
// In Android l_len is __kernel_off_t which is not the same size as off_t in
// 64 bits.
flck.l_len = __kernel_off_t(data.utf8.count)
#else
flck.l_len = off_t(data.utf8.count)
#endif
rc = fcntl(fd, F_SETLK, &flck)
expectEqual(0, rc)

Expand Down
15 changes: 3 additions & 12 deletions utils/swift_build_sdk_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,18 +410,9 @@ def main():
# Copy a file containing SDK build version into the prebuilt module dir,
# so we can keep track of the SDK version we built from.
copySystemVersionFile(args.sdk, args.output_dir)
if 'ANDROID_DATA' not in os.environ:
shared_output_lock = multiprocessing.Lock()
pool = multiprocessing.Pool(args.jobs, set_up_child,
(args, shared_output_lock))
else:
# Android doesn't support Python's multiprocessing as it doesn't have
# sem_open, so switch to a ThreadPool instead.
import threading
shared_output_lock = threading.Lock()
from multiprocessing.pool import ThreadPool
pool = ThreadPool(args.jobs, set_up_child,
(args, shared_output_lock))
shared_output_lock = multiprocessing.Lock()
pool = multiprocessing.Pool(args.jobs, set_up_child,
(args, shared_output_lock))

interface_framework_dirs = (args.interface_framework_dirs or
DEFAULT_FRAMEWORK_INTERFACE_SEARCH_PATHS)
Expand Down

0 comments on commit 496da9d

Please sign in to comment.