Skip to content

Add KMScube & WestonSimpleEGL Test for Graphics Public CI #40

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 0 commits into from

Conversation

maheswaqcom
Copy link
Contributor

Description:
This script automates the validation of KMSCube & WestonSImpleEGL Graphics Tests

kmscube:
A simple OpenGL ES demo that renders a rotating cube using the Linux kernel mode-setting (KMS) and direct rendering manager (DRM) APIs. It showcases rendering without a windowing system like X or Wayland.

weston-simple-egl:
A basic EGL and OpenGL ES demo client for the Weston Wayland compositor. It renders a spinning cube to demonstrate EGL context creation and buffer swapping in a Wayland environment.

@maheswaqcom
Copy link
Contributor Author

@mwasilew @smuppand @abbajaj806 Could you please review this PR ?

# Import common functions
. "$(pwd)/init_env"
. "$TOOLS/functestlib.sh"

Copy link
Contributor

Choose a reason for hiding this comment

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

Since the shellcheck recommends ^-- SC1090: Can't follow non-constant source. Use a directive to specify location. Better we define it like below
. /var/qcom-linux-testkit/init_env
. /var/qcom-linux-testkit/utils/functestlib.sh

Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't work if you don't install the suite in this location. When running LAVA jobs it's exactly the case. I propose to ignore "can't follow" warning.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is what we are asking in readme.md file. To copy this in /var/ folder.

git clone
cd
scp -r common Runner user@<target_device_ip>:/var
ssh user@<target_device_ip>
cd /var/Runner && ./run-test.sh cpufreq

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not always the case when running the tests.

log_info "------------------- Starting $TESTNAME Testcase ----------------------------"

# Validate if kmscube binary is available
if ! command -v kmscube >/dev/null 2>&1; then
Copy link
Contributor

Choose a reason for hiding this comment

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

fi

# Check if DRM device exists
if [ ! -e /dev/dri/card0 ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Move these device checks to functestlib.sh, as they are common functions that others might also need to use.

exit 1
fi

# Print result helper
Copy link
Contributor

Choose a reason for hiding this comment

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

As you are importing functionslib.sh. Better use log_pass, log_fail from https://github.com/qualcomm-linux/qcom-linux-testkit/blob/main/Runner/utils/functestlib.sh#L55

: > "$LOG_FILE"

# Run kmscube and log output
/usr/bin/kmscube --device /dev/dri/card0 --count="$FRAME_COUNT" 2>&1 | tee -a "$LOG_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

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

prefer command -v kmscube or let $PATH handle it.

#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause-Clear
# Description: Script to test the 'weston-simple-egl' Wayland client for 30 seconds and log the result.

Copy link
Contributor

Choose a reason for hiding this comment

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

above recommendations are applicable to this file as well.

@smuppand
Copy link
Contributor

@maheswaqcom please rebase and resolve the conficts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants