summaryrefslogtreecommitdiff
path: root/automated/linux
diff options
context:
space:
mode:
Diffstat (limited to 'automated/linux')
-rw-r--r--automated/linux/ltp/skipfile-lkft.yaml19
-rwxr-xr-xautomated/linux/workload-automation3/workload-automation.sh111
-rw-r--r--automated/linux/workload-automation3/workload-automation.yaml58
3 files changed, 188 insertions, 0 deletions
diff --git a/automated/linux/ltp/skipfile-lkft.yaml b/automated/linux/ltp/skipfile-lkft.yaml
index 4fcf4a3..a6c8c4a 100644
--- a/automated/linux/ltp/skipfile-lkft.yaml
+++ b/automated/linux/ltp/skipfile-lkft.yaml
@@ -471,3 +471,22 @@ skiplist:
tests:
- open10
- creat08
+
+ - reason: >
+ LKFT: next: LTP open11 failed - Got:
+ TEST_ERRNO=EACCES(13): Permission denied instead of errno 0
+ morty to rocko (openembedded) caused this bug
+ url: https://bugs.linaro.org/show_bug.cgi?id=3948
+ environments: production
+ boards:
+ - qemu_x86_64
+ - qemu_arm64
+ - qemu_arm
+ branches:
+ - 4.4
+ - 4.9
+ - 4.14
+ - 4.17
+ - mainline
+ tests:
+ - open11
diff --git a/automated/linux/workload-automation3/workload-automation.sh b/automated/linux/workload-automation3/workload-automation.sh
new file mode 100755
index 0000000..e887c53
--- /dev/null
+++ b/automated/linux/workload-automation3/workload-automation.sh
@@ -0,0 +1,111 @@
+#!/bin/sh -ex
+# shellcheck disable=SC1090
+
+TEST_DIR=$(dirname "$(realpath "$0")")
+OUTPUT="${TEST_DIR}/output"
+SKIP_INSTALL="false"
+
+WA_TAG="master"
+WA_GIT_REPO="https://github.com/ARM-software/workload-automation"
+WA_TEMPLATES_REPO="https://git.linaro.org/qa/wa-templates"
+TEMPLATES_BRANCH="master"
+CONFIG="config/generic-linux-localhost.yaml"
+AGENDA="agenda/linux-dhrystone.yaml"
+DEVLIB_REPO="https://github.com/ARM-software/devlib.git"
+DEVLIB_TAG="master"
+
+usage() {
+ echo "Usage: $0 [-s <true|false>] [-t <wa_tag>] [-r <wa_templates_repo>] [-T <templates_branch>] [-c <config>] [-a <agenda>] [-o <output_dir> ] [-R <wa_git_repository>] [-d <devlib_repo>] [-D <devlib_tag>]" 1>&2
+ exit 1
+}
+
+while getopts ":s:t:r:T:c:a:o:R:D:d:" opt; do
+ case "${opt}" in
+ s) SKIP_INSTALL="${OPTARG}" ;;
+ t) WA_TAG="${OPTARG}" ;;
+ r) WA_TEMPLATES_REPO="${OPTARG}" ;;
+ T) TEMPLATES_BRANCH="${OPTARG}" ;;
+ c) CONFIG="${OPTARG}" ;;
+ a) AGENDA="${OPTARG}" ;;
+ R) WA_GIT_REPO="${OPTARG}" ;;
+ o) NEW_OUTPUT="${OPTARG}" ;;
+ D) DEVLIB_TAG="${OPTARG}" ;;
+ d) DEVLIB_REPO="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+. "${TEST_DIR}/../../lib/sh-test-lib"
+
+! check_root && error_msg "Please run this test as root."
+cd "${TEST_DIR}"
+if [ ! -z "${NEW_OUTPUT}" ]; then
+ OUTPUT="${NEW_OUTPUT}"
+fi
+create_out_dir "${OUTPUT}"
+RESULT_FILE="${OUTPUT}/result.txt"
+export RESULT_FILE
+
+if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then
+ info_msg "WA installation skipped"
+else
+ PKGS="git wget zip tar xz-utils python python-yaml python-lxml python-setuptools python-numpy python-colorama python3 python3-pip sqlite3 time sysstat openssh-client openssh-server sshpass python-jinja2 curl"
+ install_deps "${PKGS}"
+ pip3 install --upgrade --quiet pip && hash -r
+ pip3 install --upgrade --quiet setuptools
+ pip3 install --quiet pexpect pyserial pyyaml docutils python-dateutil
+
+ info_msg "Installing workload-automation..."
+ rm -rf workload-automation
+ git clone "${WA_GIT_REPO}" workload-automation
+ (
+ cd workload-automation
+ git checkout "${WA_TAG}"
+ )
+ pip3 install --quiet ./workload-automation
+ export PATH=$PATH:/usr/local/bin
+ which wa
+ mkdir -p ~/.workload_automation
+ export WA_USER_DIRECTORY=~/.workload_automation
+ wa --version
+ wa list augmentations
+
+ info_msg "Installing devlib..."
+ rm -rf devlib
+ git clone "${DEVLIB_REPO}" devlib
+ (
+ cd devlib
+ git checkout "${DEVLIB_TAG}"
+ )
+ pip3 install --quiet ./devlib
+fi
+
+rm -rf wa-templates
+git clone "${WA_TEMPLATES_REPO}" wa-templates
+(
+ cd wa-templates
+ git checkout "${TEMPLATES_BRANCH}"
+ cp "${CONFIG}" ../config.yaml
+ cp "${AGENDA}" ../agenda.yaml
+)
+
+# Setup root SSH login with password for test run via loopback.
+sed -i 's/^PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
+sed -i 's/^# *PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
+grep "PermitRootLogin yes" /etc/ssh/sshd_config
+echo "root:linaro123" | chpasswd
+/etc/init.d/ssh restart && sleep 3
+
+# Ensure that csv is enabled in result processors.
+if ! grep -q 'csv' ./config.yaml; then
+ sed -i "s/augmentations:/augmentations:\n - csv/" ./config.yaml
+fi
+
+info_msg "About to run WA with ${AGENDA}..."
+wa run ./agenda.yaml -v -f -d "${OUTPUT}/wa" -c ./config.yaml || report_fail "wa-test-run"
+
+# Save results from results.csv to result.txt.
+# Use id-iteration_metric as test case name.
+awk -F',' 'NR>1 {gsub(/[ _]/,"-",$4); printf("%s-itr%s_%s pass %s %s\n",$1,$3,$4,$5,$6)}' "${OUTPUT}/wa/results.csv" \
+ | sed 's/\r//g' \
+ | tee -a "${RESULT_FILE}"
diff --git a/automated/linux/workload-automation3/workload-automation.yaml b/automated/linux/workload-automation3/workload-automation.yaml
new file mode 100644
index 0000000..a82a378
--- /dev/null
+++ b/automated/linux/workload-automation3/workload-automation.yaml
@@ -0,0 +1,58 @@
+metadata:
+ name: workload-automation-linux
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Workload Automation on Linux"
+ maintainer:
+ - milosz.wasilewski@linaro.org
+ - chase.qi@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - centos
+ - fedora
+ devices:
+ - juno
+ - hi6220-hikey
+ - apq8016-sbc
+ - x15
+ scope:
+ - performance
+
+params:
+ SKIP_INSTALL: "false"
+ # Params for WA test run.
+ WA_TAG: "master"
+ WA_GIT_REPO: "https://github.com/ARM-software/workload-automation"
+ # Install devlib, which is WA depenency
+ DEVLIB_REPO: "https://github.com/ARM-software/devlib.git"
+ DEVLIB_TAG: "master"
+ WA_TEMPLATES_REPO: "https://git.linaro.org/qa/wa-templates"
+ TEMPLATES_BRANCH: "master"
+ CONFIG: "config/generic-linux-localhost.yaml"
+ AGENDA: "agenda/linux-dhrystone.yaml"
+ # allow extra extenstions for WA
+ WA_EXTENSION_PATHS: ""
+ # directory where the WA results are stored
+ # defaults to {TEST_DIR}/output
+ OUTPUT: ""
+ # Specify url and token for publishing artifacts.
+ # For safety reasons, please set 'ARTIFACTORIAL_TOKEN' variable in job definition with
+ # 'secrets' dictionary, and set job visibility to personal or group.
+ # Refer to https://validation.linaro.org/static/docs/v2/publishing-artifacts.html
+ ARTIFACTORIAL_URL: "https://archive.validation.linaro.org/artifacts/team/qa/"
+ ARTIFACTORIAL_TOKEN: ""
+
+run:
+ steps:
+ - export WA_EXTENSION_PATHS=$WA_EXTENSION_PATHS
+ - cd ./automated/linux/workload-automation3
+ - echo ${OUTPUT}
+ - if [ -z "${OUTPUT}" ]; then OUTPUT="./output"; fi
+ - echo ${OUTPUT}
+ # Test run.
+ - ./workload-automation.sh -s "${SKIP_INSTALL}" -t "${WA_TAG}" -r "${WA_TEMPLATES_REPO}" -T "${TEMPLATES_BRANCH}" -c "${CONFIG}" -a "${AGENDA}" -R "${WA_GIT_REPO}" -d "${DEVLIB_REPO}" -D "${DEVLIB_TAG}" -o "${OUTPUT}"
+ # Upload test output to artifactorial.
+ - tar caf "wa-output.tar.xz" "${OUTPUT}"
+ - ../../utils/upload-to-artifactorial.sh -a "wa-output.tar.xz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}"
+ # Send test result to LAVA.
+ - ../../utils/send-to-lava.sh "${OUTPUT}/result.txt"