| #!/bin/bash |
| |
| download() |
| { |
| git_clone_update https://github.com/linux-test-project/ltp.git |
| git_clone_update https://kernel.googlesource.com/pub/scm/utils/cpu/mce/mce-inject.git |
| # keep it in the last to set the effective source_dir |
| git_clone_update https://github.com/aegl/mce-test.git |
| } |
| |
| build() |
| { |
| patch_source |
| |
| make |
| make -C ../mce-inject |
| } |
| |
| install() |
| { |
| make install || return |
| cp -af ./* "$BM_ROOT" |
| |
| make install -C ../mce-inject || return |
| |
| cp -af ../mce-inject/mce-inject "$BM_ROOT" |
| |
| cp -af ../ltp "$BM_ROOT" |
| } |
| |
| pack() |
| { |
| { |
| echo /usr |
| echo /usr/sbin |
| echo /usr/sbin/mce-inject |
| echo /lkp |
| echo /lkp/benchmarks |
| echo /lkp/benchmarks/"$BM_NAME" |
| find /lkp/benchmarks/"$BM_NAME"/* |
| } | |
| cpio --quiet -o -H newc --owner=root.root | gzip -n -9 > /lkp/benchmarks/"${BM_NAME}".cgz |
| [[ $arch ]] && mv "/lkp/benchmarks/${BM_NAME}.cgz" "/lkp/benchmarks/${BM_NAME}-${arch}.cgz" |
| } |