rtla/tests/scripts/run_tests.sh
John Kacur f6b8fb4dda Forward port the tests directory for ci testing
Resolves: rhbz#2196611
jiraProject == RHELPLAN-156801

Signed-off-by: John Kacur <jkacur@redhat.com>
2023-05-09 11:00:06 -04:00

45 lines
804 B
Bash
Executable File

#!/usr/bin/bash
# Make sure rtla is installed
if rpm -q rtla; then
:
else
# libtraceevent is a dependency of libtracefs too
sudo dnf install -y libtraceevent
if [[ $? != 0 ]]; then
echo "install of rtla dependency libtraceevent failed"
exit 1
fi
sudo dnf install -y libtracefs
if [[ $? != 0 ]]; then
echo "install of rtla dependency libtracefs failed"
exit 1
fi
sudo dnf install -y rtla
if [[ $? != 0 ]]; then
echo "install of rtla dependency libtracefs failed"
exit 1
fi
fi
rtla
if [[ $? != 1 ]]; then
# When you run rtla without a command, it exits with a failure
echo "rtla failed to run"
exit 1
fi
rtla timerlat -h
if [[ $? != 0 ]]; then
echo "rtla timerlat -h failed"
exit 1
fi
rtla osnoise -h
if [[ $? != 0 ]]; then
echo "rtla osnoise -h failed"
exit 1
fi
exit 0