aboutsummaryrefslogtreecommitdiff

art-build-scripts

Contents:

  • Overview
  • Requirements
  • Directory Structure
  • Guidelines

Overview

The art-build-scripts are part of a stable/tip checkout. All scripts work for both Tip and Stable. The scripts follow the Google Shell Style Guide, plus following additions:

  • All scripts use set -o nounset (done by default in utils.sh).
  • Constant variables used in the same script are in lower_case.
  • Constant variables used across scripts or picked up from environment are in UPPER_CASE.

Requirements

  1. bash 4.2+

Note: you don't need to have shellcheck installed, presubmit.sh will download it if necessary.

Directory Structure

(mostly output from tree -Fn) . ├── benchmarks/ │   ├── benchmarks_run_target.sh Runs benchmarks in a android root configuration. │   └── boot_oat_measurements_host.sh Runs boot.oat measurements on the host. ├── devices/ Device specific scripts. │   ├── config/ Contains the configuration for each device. │   │   ├── angler.sh │   │   ├── bullhead.sh │   │   └── flounder.sh │   ├── cpu_freq_utils.sh │   ├── flash_device.sh Helper script sourced by flash_${device}.sh scripts below: │   ├── flash_nexus5x.sh -=| │   ├── flash_nexus6p.sh | Use these scripts to flash │   ├── flash_nexus9.sh | a particular device │   ├── flash_pixel.sh -=| │   └── set_cpu_freq.sh Sets the CPU frequency on your nexus device. ├── jenkins/ │   ├── presubmit_art_testing.sh Presubmit test for art-testing repo (benchmarks) │   ├── presubmit_vixl_test_mac.sh Presubmit for vixl project (Mac OS only) │   ├── presubmit_vixl_test.sh Presubmit for vixl project │   ├── setup_adb.sh Script to setup adb configuration for CI jobs. │   ├── setup_android.sh Used by Jenkins to apply your patch & setup an Android env. │   ├── setup_host.sh Used by Jenkins to set-up the Jenkins host. │   └── test_launcher.pl Used by Jenkins as a wrapper for running the scripts, │ so that every script gets its new process group ID. ├── presubmit.sh Presubmit script that uses shellcheck and a few other checkers. ├── README.md This file. ├── tests/ │   ├── monkey/ │   │   ├── blacklist │   │   ├── monkey.sh │   │   └── whitelist │   ├── test_art_build_linux_target.sh ART on linux test script. │   ├── test_art_fuzzer.sh The fuzzer script. │   ├── test_art_host.sh The host tests script. │   ├── test_art_target.sh The target tests script. │   ├── test_art_vixl.sh The VIXL tests script. │   └── test_boot_to_gui_emulator.sh The Boot to GUI script. └── utils/ ├── utils_android_root.sh Utilities to setup android_root configuration. ├── utils_android.sh Utilities for android tree manipulation. └── utils.sh Common utilities.

Guidelines

  • All executable scripts should have a main() function.
  • All executable scripts should take options (at least -h and -v) in arguments_parser().
  • All executable scripts have a usage() (-h or --help) that tells how the script should be used.
  • All helper scripts are not executable.
  • All scripts should include at least utils.sh, which
  • sets global shell options like set -o nounset and,
  • enables coloured logging for interactive sessions (not jenkins).
  • All scripts and changes should be checked by running ./presubmit.sh.