-
Notifications
You must be signed in to change notification settings - Fork 21
Adding support for IGT tests #174
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
base: main
Are you sure you want to change the base?
Adding support for IGT tests #174
Conversation
cbe7c59
to
9df5b46
Compare
Please squash the commits |
ensure that the test scripts are having executable permissions |
92a35bb
to
22cb285
Compare
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]>
16f0508
to
47a5d35
Compare
@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") |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Added Display IGT Core Auth test suite
Added test files for Display IGT Core Authentication validation: