Skip to content

[SR-1749] Split Android tests into host tests and non-host tests #44358

@modocache

Description

@modocache
mannequin
Previous ID SR-1749
Radar None
Original Reporter @modocache
Type New Feature
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Project Infrastructure
Labels New Feature, Android, StarterBug
Assignee None
Priority Medium

md5: c2b56bd2bca26efee9b877588b77480a

Issue Description:

The Swift build system and test suite define "host tests" (tests that are executed on a physical device or simulator). Tests that are not "host tests" can be run without a device or simulator.

Currently, all tests for Android are only run if --host-tests is passed to the Swift utils/build-script when testing. However, only some of these tests actually require an Android device--most can run on a Linux desktop.

Tests in the Swift test suite are already marked as "host tests" or not – there's no need to modify individual tests. However, utils/build-script and utils/build-script-impl need to be modified to take advantage of the "host tests" flags, like iOS does.

Prerequisites:

  • An Ubuntu 15.10 development environment capable of building Swift from source.

  • A physical Android device.

Helpful skills:
Basic knowledge of Python, shellscript, and CMake may help.

Starting point:

  1. Follow the instructions in docs/Android.md to build and run the test suite on a physical Android device.

  2. Check out the Android test logic. Notice how it's different from the Apple TV test logic? I think these need to be the same, or at least more similar (although I don't think Android needs the benchmark tests).

Once the task is finished, I should be able to run a subset of the Android test suite, even without a physical Android device. This is exciting because it will lower the hurdle for testing Swift on Android on some sort of CI server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions