1*c2e18aaaSAndroid Build Coastguard Worker# A tool 2*c2e18aaaSAndroid Build Coastguard Worker 3*c2e18aaaSAndroid Build Coastguard WorkerA tool is a command-line tool that can run android workflows and productivity tools 4*c2e18aaaSAndroid Build Coastguard Workergo/a-tool-design-doc 5*c2e18aaaSAndroid Build Coastguard Worker 6*c2e18aaaSAndroid Build Coastguard WorkerContributions welcome! 7*c2e18aaaSAndroid Build Coastguard Worker 8*c2e18aaaSAndroid Build Coastguard Worker### A and Autocomplete aliases 9*c2e18aaaSAndroid Build Coastguard WorkerAdd the following to your ~/.bashrc for autocompletions 10*c2e18aaaSAndroid Build Coastguard Worker``` 11*c2e18aaaSAndroid Build Coastguard Worker# Alias for local workflow "a update" tool 12*c2e18aaaSAndroid Build Coastguard Workera() { 13*c2e18aaaSAndroid Build Coastguard Worker python3 "$ANDROID_BUILD_TOP/tools/asuite/experiments/a/a.py" "$@" 14*c2e18aaaSAndroid Build Coastguard Worker} 15*c2e18aaaSAndroid Build Coastguard Worker_a_completion() { 16*c2e18aaaSAndroid Build Coastguard Worker local cur prev opts 17*c2e18aaaSAndroid Build Coastguard Worker COMPREPLY=() 18*c2e18aaaSAndroid Build Coastguard Worker cur="${COMP_WORDS[COMP_CWORD]}" 19*c2e18aaaSAndroid Build Coastguard Worker prev="${COMP_WORDS[COMP_CWORD-1]}" 20*c2e18aaaSAndroid Build Coastguard Worker 21*c2e18aaaSAndroid Build Coastguard Worker if [[ ${prev} == "a" ]] ; then 22*c2e18aaaSAndroid Build Coastguard Worker COMPREPLY=( $(compgen -W "update" -- ${cur}) ) 23*c2e18aaaSAndroid Build Coastguard Worker return 0 24*c2e18aaaSAndroid Build Coastguard Worker fi 25*c2e18aaaSAndroid Build Coastguard Worker 26*c2e18aaaSAndroid Build Coastguard Worker if [[ ${prev} == "update" ]] ; then 27*c2e18aaaSAndroid Build Coastguard Worker COMPREPLY=( $(compgen -W "$(a update --list-aliases)" -- ${cur}) ) 28*c2e18aaaSAndroid Build Coastguard Worker return 0 29*c2e18aaaSAndroid Build Coastguard Worker fi 30*c2e18aaaSAndroid Build Coastguard Worker} 31*c2e18aaaSAndroid Build Coastguard Workercomplete -F _a_completion a 32*c2e18aaaSAndroid Build Coastguard Worker``` 33*c2e18aaaSAndroid Build Coastguard Worker 34*c2e18aaaSAndroid Build Coastguard Worker### To Run 35*c2e18aaaSAndroid Build Coastguard Worker```a {config_name}``` 36*c2e18aaaSAndroid Build Coastguard Workeror 37*c2e18aaaSAndroid Build Coastguard Worker```python3 a.py {config_name}``` 38*c2e18aaaSAndroid Build Coastguard Worker 39*c2e18aaaSAndroid Build Coastguard Worker### To develop 40*c2e18aaaSAndroid Build Coastguard Worker```python3 a.py {config_name}``` 41*c2e18aaaSAndroid Build Coastguard Worker 42*c2e18aaaSAndroid Build Coastguard Worker### To Test: 43*c2e18aaaSAndroid Build Coastguard Workeror 44*c2e18aaaSAndroid Build Coastguard Worker```python3 -m unittest **/*_test.py``` 45*c2e18aaaSAndroid Build Coastguard Workeror 46*c2e18aaaSAndroid Build Coastguard Worker```python3 tests.py`` 47*c2e18aaaSAndroid Build Coastguard Workeror 48*c2e18aaaSAndroid Build Coastguard Worker```atest .``` 49