featherless 531b372815
[CI] Fix the test_all script. (#5538)
## Prior to this change

Our test_all script was using an Xcode schemes search and filter to identify any test schemes that exist in the repository and test them. Unfortunately, the script was not also testing to confirm that it found at least *some* tests, meaning if it did not find any tests it would silently succeed.

The script was essentially optimized for us adding multiple test schemes in the future. In practice, the frequency with which we add new test schemes is low (we've added only one in the past year via MaterialComponentsAlpha).

## The root cause

With d238c86d47eb072617d285106147ace613321aee, our Xcode test scheme names changed and our scheme search was no longer returning our unit test schemes, resulting in test_all succeeding even though it hadn't run any tests.

## After this change

The test_all script will explicitly test specific schemes. If these schemes change or move in the future, this script will fail until we also update the script's schemes.

This script now also pipes the test output through xcpretty if it is available.

Closes https://github.com/material-components/material-components-ios/issues/5539
2018-10-26 15:29:01 -04:00
..
2018-10-04 13:43:15 -04:00
2018-10-26 15:29:01 -04:00

Scripts

Scripts for maintaining Material Components for iOS—none of these scripts are required to use MDC or for casual contributors.

The important scripts are:

  • prep_all: prepare the Material Components catalog, tests, and demos apps for building.
  • build_all: build the Material Components catalog and each of our demo apps.
  • test_all: build and test the Material Components unit and integration tests.
  • clean_all: remove artifacts from the prep_all, build_all, and test_all scripts.
  • check_components: run component checks for documentation, examples, etc.
  • install_contributor_tools: install local contributor tools to speed up the development cycle.

Languages

Material Components follows Google's language standards for scripting. The following languages can be used for scripts:

Either language can be used for a particular purpose, but larger or more complex scripts should be written in (or converted to) Python. Bash scripts get unwieldy quickly and advanced Bash scripting knowledge is currently less common than advanced Python scripting knowledge.

The intent is that the scripts will run on relatively current OS X machines with (only) Xcode installed.

iOS Codelabs Build Tests

iOS codelabs build tests ensure that the Objective C and Swift versions of Codelab 104 Complete and Codelab 111 Complete can be built. If a release fails the codelabs build tests, follow these steps:

  1. If the release changes a component that the codelabs use, submit a PR to the codelabs repo with the appropriate changes for the adjusted component. Address each codelab and language that is affected by the change (it may be helpful to run ./build_codelabs -a to determine which codelabs are affected).
  2. Merge the PR into the codelabs repo, and then rerun the codelabs build tests.
  3. Continue with the release process.