blob: 961a10d7697d9b4187382a7071f936cca47dcfcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#!/bin/bash -ex
# shellcheck disable=SC1090
TEST_DIR=$(dirname "$(realpath "$0")")
OUTPUT="${TEST_DIR}/output"
SKIP_INSTALL="false"
LISA_REPOSITORY="https://github.com/ARM-software/lisa"
LISA_REF="master"
LISA_SCRIPT="ipynb/wltests/sched-evaluation-full.py"
usage() {
echo "Usage: $0 [-t <lisa_repository_ref>] [-r <lisa_repository>] [-s <lisa_script>] [-S <skip_install>]" 1>&2
exit 1
}
while getopts ":t:r:s:S:" opt; do
case "${opt}" in
t) LISA_REF="${OPTARG}" ;;
r) LISA_REPOSITORY="${OPTARG}" ;;
s) LISA_SCRIPT="${OPTARG}" ;;
S) SKIP_INSTALL="${OPTARG}" ;;
*) usage ;;
esac
done
. "${TEST_DIR}/../../lib/sh-test-lib"
! check_root && error_msg "Please run this test as root."
cd "${TEST_DIR}"
create_out_dir "${OUTPUT}"
RESULT_FILE="${OUTPUT}/result.txt"
export RESULT_FILE
if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then
info_msg "Dependency and python2 venv installation skipped"
test -d .venv || error_msg "python2 venv for LISA is required, but not found!"
. .venv/bin/activate
else
PKGS="virtualenv build-essential autoconf automake libtool pkg-config trace-cmd sshpass kernelshark nmap net-tools tree libfreetype6-dev libpng12-dev python-pip python-dev python-tk"
install_deps "${PKGS}"
virtualenv --python=python2 .venv
. .venv/bin/activate
pip install --quiet matplotlib numpy nose Cython trappy bart-py devlib psutil wrapt scipy IPython
git clone "${LISA_REPOSITORY}" lisa
(
cd lisa
git checkout "${LISA_REF}"
)
fi
# TODO: check if lisa directory exists
cd lisa
. init_env
lisa-update submodules
python "${LISA_SCRIPT}"
ls
for FILE in *.csv
do
python "${TEST_DIR}/postprocess_lisa_results.py" -f "${FILE}" -o "${RESULT_FILE}"
done
|