Skip to content

LAVA support along with test definitions comment fixes #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.

SPDX-License-Identifier: BSD-3-Clause-Clear
13 changes: 3 additions & 10 deletions Runner/init_env
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
# Source this file to setup the test suite environment
if [ -e '/var/Runner' ];then
export BASEDIR='/var/Runner'
export TOOLS='/var/Runner/utils'
export SUITES='/var/Runner/suites'
export CALIBRATION='/var/Runner/calib.txt'
export FTRACE_EVENTS='/var/Runner/ftrace_events'
export PATH=$PATH:'/bin'
export PATH=$PATH:'/sbin'
fi

export BASEDIR=$(pwd)
export TOOLS=$(pwd)/utils
export SUITES=$(pwd)/suites
17 changes: 17 additions & 0 deletions Runner/plans/AudioCI_PreMerge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
metadata:
format: Lava-Test Test Definition 1.0
name: AUSanity
description: "Baseline AU Sanity test plan"
maintainer:
- vnarapar@qti.qualcomm.com
os:
- openembedded
scope:
- functional
devices:
- rb3gen2

run:
steps:
- cd Runner
- chmod -R 777 *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the steps are missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

steps will be added once audio related testcases are merged

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just remove it from the commit. No point carrying empty/broken test definition

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

55 changes: 55 additions & 0 deletions Runner/plans/KernelCI_PreMerge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
metadata:
format: Lava-Test Test Definition 1.0
name: AUSanity
description: "Baseline AU Sanity test plan"
maintainer:
- vnarapar@qti.qualcomm.com
os:
- openembedded
scope:
- functional
devices:
- rb3gen2

run:
steps:
- cd Runner
- chmod -R 777 *
- $PWD/suites/Kernel/FunctionalArea/baseport/adsp_remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/adsp_remoteproc/adsp_remoteproc.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/cdsp_remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/cdsp_remoteproc/cdsp_remoteproc.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/CPUFreq_Validation/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/CPUFreq_Validation/CPUFreq_Validation.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/GIC/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/GIC/GIC.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/hotplug/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/hotplug/hotplug.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/Interrupts/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/Interrupts/Interrupts.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/iommu/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/iommu/iommu.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/IPA/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/IPA/IPA.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/IPCC/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/IPCC/IPCC.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/irq/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/irq/irq.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/kaslr/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/kaslr/kaslr.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/MEMLAT/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/pinctrl/pinctrl.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/Reboot_health_check/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/Reboot_health_check/Reboot_health_check.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/remoteproc/remoteproc.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/RMNET/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/RMNET/RMNET.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/rngtest/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/smmu/smmu.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/storage/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/storage/storage.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/watchdog/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/watchdog/watchdog.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/wpss_remoteproc.res || true
59 changes: 59 additions & 0 deletions Runner/plans/meta-qcom_PreMerge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
metadata:
format: Lava-Test Test Definition 1.0
name: AUSanity
description: "Baseline AU Sanity test plan"
maintainer:
- vnarapar@qti.qualcomm.com
os:
- openembedded
scope:
- functional
devices:
- rb3gen2

run:
steps:
- cd Runner
- chmod -R 777 *
- $PWD/suites/Kernel/FunctionalArea/baseport/adsp_remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/adsp_remoteproc/adsp_remoteproc.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/cdsp_remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/cdsp_remoteproc/cdsp_remoteproc.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/CPUFreq_Validation/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/CPUFreq_Validation/CPUFreq_Validation.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/GIC/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/GIC/GIC.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/hotplug/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/hotplug/hotplug.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/Interrupts/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/Interrupts/Interrupts.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/iommu/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/iommu/iommu.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/IPA/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/IPA/IPA.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/IPCC/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/IPCC/IPCC.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/irq/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/irq/irq.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/kaslr/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/kaslr/kaslr.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/pinctrl/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/pinctrl/pinctrl.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/qcrypto/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/qcrypto/qcrypto.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/Reboot_health_check/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/Reboot_health_check/Reboot_health_check.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/remoteproc/remoteproc.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/RMNET/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/RMNET/RMNET.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/smmu/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/smmu/smmu.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/storage/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/storage/storage.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/Timer/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/Timer/Timer.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/watchdog/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/watchdog/watchdog.res || true
- $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/run.sh || true
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/wpss_remoteproc.res || true
40 changes: 34 additions & 6 deletions Runner/run-test.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,42 @@
#!/bin/sh
# Import test suite definitions
source /var/Runner/init_env

source $(pwd)/init_env

#import test functions library
source $TOOLS/functestlib.sh
. $TOOLS/functestlib.sh


# Find test case path by name
find_test_case_by_name() {
local test_name="$1"
find /var/Runner/suites -type d -iname "$test_name" 2>/dev/null
# local test_name="$1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove lines if they're not used.

# dir= "."
# Check if the file is a directory
if [ -d "$1" ]; then
# Get the directory name
dir_name_in_dir=${1##*/}

# Check if the directory name matches the user input (ignoring case)
if [ "${dir_name_in_dir,,}" = "$test_name" ]; then
# Get the absolute path of the directory
abs_path=$(readlink -f "$1")
echo "$abs_path"
# Check if the run.sh file is present in the absolute path (ignoring case)
# if [ -f "$abs_path/run.sh" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove lines if they're not used.

# Print the absolute path of run.sh
# echo "Absolute path of run.sh: $abs_path/run.sh"
# fi
fi
fi

# Recursively search for the directory in the subdirectory
for file in "$1"/*; do
# Check if the file is a directory
if [ -d "$file" ]; then
# Recursively search for the directory in the subdirectory
find_test_case_by_name "$file"
fi
done
}

# Execute a test case
Expand All @@ -35,8 +62,9 @@ execute_test_case() {

# Function to run a specific test case by name
run_specific_test_by_name() {
local test_name="$1"
test_path=$(find_test_case_by_name "$test_name")
test_name="$1"
test_name=${test_name,,}
test_path=$(find_test_case_by_name ".")
if [ -z "$test_path" ]; then
log "Test case with name $test_name not found."
else
Expand Down
10 changes: 5 additions & 5 deletions Runner/suites/Kernel/FunctionalArea/baseport/BWMON/run.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
# Import test suite definitions
/var/Runner/init_env
. $(pwd)/init_env
TESTNAME="BWMON"

#import test functions library
source $TOOLS/functestlib.sh
. $TOOLS/functestlib.sh
test_path=$(find_test_case_by_name "$TESTNAME")
log_info "--------------------------------------------------------------------------"
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
Expand Down Expand Up @@ -51,9 +51,9 @@ done

if $incremented; then
log_pass "$TESTNAME : Test Passed"
echo "$TESTNAME : Test Passed" > $test_path/$TESTNAME.res
echo "$TESTNAME PASS" > $test_path/$TESTNAME.res
else
log_fail "$TESTNAME : Test Failed"
echo "$TESTNAME : Test Failed" > $test_path/$TESTNAME.res
log_fail "$TESTNAME : Test Failed"
echo "$TESTNAME FAIL" > $test_path/$TESTNAME.res
fi
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
10 changes: 5 additions & 5 deletions Runner/suites/Kernel/FunctionalArea/baseport/Buses/run.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
# Import test suite definitions
/var/Runner/init_env
. $(pwd)/init_env
TESTNAME="Buses"

#import test functions library
source $TOOLS/functestlib.sh
. $TOOLS/functestlib.sh
test_path=$(find_test_case_by_name "$TESTNAME")
log_info "-----------------------------------------------------------------------------------------"
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
Expand All @@ -18,9 +18,9 @@ output=$(i2c-msm-test -v -D /dev/i2c-0 -l | grep "ret:1")

if echo "$output" | grep -q "Reading"; then
log_pass "$TESTNAME : Test Passed"
echo "$TESTNAME : Test Passed" > $test_path/$TESTNAME.res
echo "$TESTNAME PASS" > $test_path/$TESTNAME.res
else
log_fail "$TESTNAME : Test Failed"
echo "$TESTNAME : Test Failed" > $test_path/$TESTNAME.res
log_fail "$TESTNAME : Test Failed"
echo "$TESTNAME FAIL" > $test_path/$TESTNAME.res
fi
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
Loading