Blame tests/scripts/run_tests.sh
|
Qiao Zhao |
6247df |
#!/usr/bin/bash
|
|
Qiao Zhao |
6247df |
|
|
Qiao Zhao |
6247df |
if rpm -q --quiet libtracefs; then
|
|
Qiao Zhao |
6247df |
:
|
|
Qiao Zhao |
6247df |
else
|
|
Qiao Zhao |
6247df |
sudo dnf install -y libtracefs
|
|
Qiao Zhao |
6247df |
if [[ $? != 0 ]]; then
|
|
Qiao Zhao |
6247df |
echo "install of libtracefs failed!"
|
|
Qiao Zhao |
6247df |
exit 1
|
|
Qiao Zhao |
6247df |
fi
|
|
Qiao Zhao |
6247df |
fi
|
|
Qiao Zhao |
6247df |
|
|
Qiao Zhao |
6247df |
echo "The libtracefs is meant to be used by perf, trace-cmd etc. Check installation."
|
|
Qiao Zhao |
6247df |
if [[ ! -f /usr/lib64/libtracefs.so.1 ]]; then
|
|
Qiao Zhao |
6247df |
echo "/usr/lib64/libtracefs.so.1 not found!"
|
|
Qiao Zhao |
6247df |
exit 2
|
|
Qiao Zhao |
6247df |
fi
|
|
Qiao Zhao |
6247df |
|
|
Qiao Zhao |
6247df |
echo "Check the trace-cmd works."
|
|
Qiao Zhao |
6247df |
if ! rpm -q --quiet trace-cmd; then
|
|
Qiao Zhao |
6247df |
sudo dnf install -y trace-cmd
|
|
Qiao Zhao |
6247df |
if [[ $? != 0 ]]; then
|
|
Qiao Zhao |
6247df |
echo "install trace-cmd failed when libtracefs exist!"
|
|
Qiao Zhao |
6247df |
exit 3
|
|
Qiao Zhao |
6247df |
fi
|
|
Qiao Zhao |
6247df |
fi
|
|
Qiao Zhao |
6247df |
trace-cmd list || exit 4
|
|
Qiao Zhao |
6247df |
|
|
Qiao Zhao |
6247df |
exit 0
|