Skip to content

Installation of termux-debug.apk on the CI for the NIO tests may be unnecessary #217

@marcprux

Description

@marcprux

Why does termux-debug.apk need to be installed in order to run swift-nioPackageTests.xctest?

cat > ~/test-toolchain.sh << EOF
adb install ~/termux-debug.apk
adb push pack /data/local/tmp
adb shell "run-as com.termux mkdir /data/data/com.termux/pack"
adb shell "run-as com.termux cp /data/local/tmp/pack/{lib*.so,swift-nioPackageTests.xctest,FileHandleTests.swift} /data/data/com.termux/pack"
adb shell "run-as com.termux cp -r /data/local/tmp/pack/Test\ Data /data/data/com.termux/pack"
adb shell "run-as com.termux ln -s README.md /data/data/com.termux/pack/Test\ Data/README.md.symlink"
adb shell "run-as com.termux ln -s Foo /data/data/com.termux/pack/Test\ Data/Foo.symlink"
adb shell "run-as com.termux sh -c 'TMPDIR=/data/data/com.termux /data/data/com.termux/pack/swift-nioPackageTests.xctest'"

If it is just so the test can access resources, it seems like it would be simpler to just do it like swift-crypto and swift-nio:

mkdir pack/crypto-vectors pack/swift-crypto_CryptoTests.resources
cp swift-crypto/Tests/Test\ Vectors/* swift-crypto/Tests/_CryptoExtrasVectors/* pack/crypto-vectors
cp swift-crypto/Tests/CryptoTests/HPKE/hpke-test-vectors.json pack/swift-crypto_CryptoTests.resources
rm swift-nio/Tests/NIOFileSystemIntegrationTests/Test\ Data/*symlink
cp -r swift-nio/Tests/NIOFileSystemIntegrationTests/Test\ Data/ swift-nio/Tests/NIOFileSystemIntegrationTests/FileHandleTests.swift pack
cp yams/Tests/YamsTests/Fixtures/SourceKitten#289/debug.yaml pack

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions