4. WHAT is CIAT
4
Continuous Integration and Automated Test
(継続的インテグレーションと自動テスト)
https://wiki.automotivelinux.org/eg-ciat#explanation_of_ciat
https://lists.linuxfoundation.org/pipermail/automotive-
discussions/2015-July/000591.html
CIAT について:
CIのパイプライン: upstreamのソース変更(またはユーザ設定)を
トリガに自動でテストを実行
Upstreamのソースコードを集約
自動ビルド・自動デプロイを実行
一連の流れでテストできる
ビルドしたソフト/テスト結果・ログの公開
変更点のコードレビュー
5. WHY use AGL-JTA
5
AGL-JTAのベースはFuego
正式名はJTA (Jenkins Test Automation)
Jenkinsがフロントエンドで動作、テストはバックグランドでスクリプト動作
LTSI projectの正規の自動テストフレームワーク
※LTSI: Long Term Support Initiative
https://ltsi.linuxfoundation.org/what-is-ltsi
⇒製品の開発期間にあわせるよう、安定したLinux kernelを長期
的、定期的にメンテナンスして運用する活動
Fuegoの利点
豊富な拡張plug-in
カスタマイズしたテストケースを準備
柔軟なテスト設定
テストの一括実行
各ハードウェア(board)のセットアップが比較的容易
6. WHY use AGL-JTA
6
AGL CIATの目標
CIAT’s goals AGL-JTA’s feature
flexible trigger
build triggers
(like gerrit, cron job)
collection of source code
Source Code Management
(SCM, like git)
instructions for
building/deploying
host/target script engine
executing sets of tests job trigger of jenkins
publishing of
distro and test results
plugins of jenkins,
or use SCM to upload distro/result
code review (offered by gerrit)
demonstration of
license compliance
(offered by gerrit)
7. HOW to use AGL-JTA
7
simple test
Jenkinsの役割:script engineのコール, test result/logの集計
script engineの役割
• Targetのcross-compile環境の設定
• Targetへテストケースをロードして、実行
• ログ出力
jenkins
(frontend)
script engine
(backend)
test script の実行 各テストの実行
result 出力 ログ出力
9. HOW to use AGL-JTA
9
Jenkinsのhomepage – testの実行
ターゲットボードの選択
テストの開始
10. HOW to use AGL-JTA
10
Jenkinsのhomepage – testの実行
スクリプト出力のログ情報等
11. HOW to use AGL-JTA – CIAT
11
AGLのCIAT
メインは自動テスト
ソフトのビルド、ターゲットの書込み
ワークフロー
trigger
ソースコード集約
ターゲットへのbuild/deploy
ターゲット上でテストの実行
テスト結果の公開
事例
private server – inhouse CIAT (mid-term test)
CIAT
Enviroment
build &
deploy
test
display
result
trigger
12. HOW to use AGL-JTA
12
CIAT 環境
hardware 設定
hub
target board
AGL-JTA
compile
server
TFTP/NFS
server
Internet
(AGL gerrit)
13. HOW to use AGL-JTA
13
CIAT 環境
hardware 設定
1. AGL-JTA
2. TFTP/NFS server
3. compile server
hub
Internet
porter
14. HOW to use AGL-JTA – CIAT
14
AGL-JTA server
1. trigger
2. ソースコード集約
CIAT.inhouse_mid
CIAT.inhouse_deploy
CIAT.batch_test
3. build & deploy
4. テストの実行,
ex)Benchmark.IOzone,
Functional.zlib
CIAT.upload 5. テスト結果の集計
private server – inhouse CIAT
15. HOW to use AGL-JTA
15
テスト結果のシェア方法
各社で実施したテスト結果はgitに登録
集計した結果の比較が可能
現在開発中
xxx company's
AGL-JTA
FTEN's
AGL-JTA
yyy company's
AGL-JTA
public
git repo
my
AGL-JTA
16. HOW to use AGL-JTA – share test result
16
CIAT.upload
CIATテストの一部 (テスト結果の集計)
JOB名:CIAT.mid, CIAT.inhouse_mid
test summary, test info, detailed resultsを公開
git repo(テスト結果)
git:
https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging/a
gl-jta-results.git;a=summary
各社と各ボードのディレクトリ構成を検討
17. HOW to use AGL-JTA – display test result
17
テスト結果のシェアと比較 ‐サマリ表示-
18. HOW to use AGL-JTA – display test result
18
テスト結果のシェアと比較 -詳細比較-
IOZONEの性能測定 ⇒ ファイルシステムのテスト結果の比較
19. HOW to use AGL-JTA
19
テスト環境構築を円滑に進めるために・・
simple testのドキュメント
REAME
docs/jta-docs.pdf
docs/How-to-Add-Test-Cases-on-JTA
CIATのドキュメント
docs/How-to-Configure-CIAT-on-AGL-JTA.pdf
21. HOW to add new board
21
新規ボードの設定
/home/jenkins/overlays/boards/****.boardを追加
/home/jenkins/overlays/scripts/tool.shに追記
/userdata/toolchains/にツールの追加
22. HOW to add new board
22
新規ボードの設定
Build Executor Statusにハードの設定を追加
23. HOW to add new board
23
新規ボードのtest
IOZONEテストの実施と集計
24. DEMO
24
Demo内容
Inhouse CIAT
マニュアル操作でゆっくりと実演
テスト内容はIOZONEテスト -> ファイルシステムの性能測定
テスト結果の比較と比較画面の紹介
CIAT
Enviroment
build &
deploy
test
display
result
trigger
Today
Enviroment
build &
deploy
test
display
result
trigger
manual