Skip to content

Conversation

vsalipal
Copy link

Added Display IGT Core Auth test suite

Added test files for Display IGT Core Authentication validation:

  • Display_IGTTestValidation_Readme.md: Documentation with usage instructions
  • run.sh: Script to execute and validate core_auth tests

@vsalipal vsalipal force-pushed the Support-for-Display-IGT-Tests branch 2 times, most recently from cbe7c59 to 9df5b46 Compare September 26, 2025 06:26
@vsalipal vsalipal marked this pull request as ready for review September 26, 2025 06:30
@vnarapar
Copy link
Contributor

Please squash the commits

@vnarapar
Copy link
Contributor

ensure that the test scripts are having executable permissions

@vsalipal vsalipal force-pushed the Support-for-Display-IGT-Tests branch from 92a35bb to 22cb285 Compare September 29, 2025 06:33
Add Display IGT Core Auth test suite

Add test files for Display IGT Core Authentication validation:
- Display_IGTTestValidation_Readme.md: Documentation with usage instructions
- run.sh: Script to execute and validate core_auth tests

Signed-off-by: vsalipal <[email protected]>
@vsalipal vsalipal force-pushed the Support-for-Display-IGT-Tests branch from 16f0508 to 47a5d35 Compare September 29, 2025 07:16
@vsalipal
Copy link
Author

Please squash the commits

@vnarapar have squashed the commits and made the file executable, can you review again

# shellcheck disable=SC1090,SC1091
. $TOOLS/functestlib.sh

test_path=$(find_test_case_by_name "$TESTNAME")
Copy link
Contributor

Choose a reason for hiding this comment

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

what if !test_path

echo "core_auth binary not found"
log_fail "$TESTNAME : core_auth binary not available"
log_info "Please install IGT (Intel Graphics Tools) package"
echo "$TESTNAME FAIL" > $test_path/$TESTNAME.res
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no deterministic results file is available to write RES_FILE

if grep -q "SUCCESS" $test_path/core_auth_log.txt; then
# If "SUCCESS" is found, print that the test passe
log_pass "$TESTNAME : Test Passed"
echo "$TESTNAME PASS" > $test_path/$TESTNAME.res
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT

else
# If "SUCCESS" is not found, print that the test failed
log_fail "$TESTNAME : Test Failed"
echo "$TESTNAME FAIL" > $test_path/$TESTNAME.res
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT

echo "Checking if dependency binary is available"

# Check if core_auth is available in system PATH first
if command -v core_auth >/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.

use check_dependencies func from Runner/utils/functestlib.sh

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion to use the check_dependencies function from Runner/utils/functestlib.sh. I understand that it checks whether the required binaries are available in the $PATH.
Since IGT binaries are typically located in /usr/libexec/igt-gpu-tools/, which isn't part of the default $PATH, the user would need to manually move the required binaries to a standard location like /usr/bin/ or /usr/local/bin/ to make them discoverable by check_dependencies. This script doesn't handle that relocation, so it would be a manual prerequisite for running the tests.
Let me know if you're okay with this assumption, or if you'd prefer a different approach.

CORE_AUTH_CMD=""

# Search in /usr directory tree for core_auth binary
if command -v find >/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.

use check_dependencies func from Runner/utils/functestlib.sh


#kill weston
echo "killing Weston before running core_auth"
pkill weston
Copy link
Contributor

Choose a reason for hiding this comment

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

Stop weston only if actually running.

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.

3 participants