Skip to content

Commit 99aafc0

Browse files
vnaraparmanasab-qli
authored andcommitted
Added Support for Diaply IGT Tests
Signed-off-by: manasab-qli <[email protected]>
2 parents a7d3701 + 9673870 commit 99aafc0

File tree

5 files changed

+133
-3
lines changed

5 files changed

+133
-3
lines changed

.github/workflows/check-executable-permissions.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Enforce Script Executable Permissions
22

33
on:
4-
pull_request:
4+
pull_request_target:
5+
branches: [ "main" ]
56
paths:
67
- '**/run.sh'
78
- '**/*.sh'
9+
push:
10+
branches: [ "main" ]
11+
workflow_dispatch:
812

913
jobs:
1014
permissions:

.github/workflows/preflight-checker-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: qualcomm-linux/qli-actions/.github/workflows/multi-checker.yml@main
1616
with:
1717
repolinter: true # default: true
18-
semgrep: false # default: true
18+
semgrep: true # default: true
1919
copyright-license-detector: true # default: true
2020
pr-check-emails: true # default: true
2121

.github/workflows/shellcheck.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Shell Lint
22

3-
on: [pull_request, push]
3+
on:
4+
pull_request_target:
5+
branches: [ "main" ]
6+
push:
7+
branches: [ "main" ]
8+
workflow_dispatch:
49

510
jobs:
611
shellcheck:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
# SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
# IGT Core Auth Test Script
5+
6+
## Overview
7+
8+
This script automates the validation of authentication mechanisms within the IGT Core framework. It performs a series of tests to ensure that the authentication processes are functioning correctly and securely. The script captures detailed logs and provides a summary of the test results.
9+
10+
## Features
11+
12+
- Comprehensive authentication tests
13+
- Environment setup for required dependencies
14+
- Detailed logging of test processes and results
15+
- Color-coded pass/fail summaries
16+
- Output stored in a structured results directory
17+
- Auto-check for required libraries and dependencies
18+
- Compatible with various Linux distributions
19+
20+
## Prerequisites
21+
22+
Ensure the following components are present in the target environment:
23+
24+
- Required authentication libraries and dependencies
25+
- Write access to the filesystem (for environment setup and logging)
26+
27+
## Directory Structure
28+
```bash
29+
Runner/
30+
├──suites/
31+
├ ├── Multimedia/
32+
│ ├ ├── Display/
33+
│ ├ ├ ├── core_auth/
34+
│ ├ ├ ├ ├ └── run.sh
35+
├ ├ ├ ├ ├ └── Display_IGTTestValidation_Readme.md
36+
```
37+
38+
## Usage
39+
40+
1. Copy the script to your target system and make it executable:
41+
42+
```bash
43+
chmod +x run.sh
44+
```
45+
46+
2. Run the script:
47+
48+
```bash
49+
./run.sh
50+
```
51+
52+
3. Logs and test results will be available in the `results/igt_core_auth` directory.
53+
54+
## Output
55+
56+
- **Validation Result**: Printed to console and saved in a results file with PASS/FAIL status.
57+
58+
## Notes
59+
60+
- The script does not take any arguments.
61+
- It validates the presence of required libraries before executing tests.
62+
- If any critical tool is missing, the script exits with an error message.
63+
64+
## Maintenance
65+
66+
- Ensure the authentication libraries remain compatible with your system.
67+
- Update test cases as per new authentication requirements or updates in the IGT Core framework.
68+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/sh
2+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
3+
# SPDX-License-Identifier: BSD-3-Clause-Clear
4+
5+
# Import test suite definitions
6+
. $(pwd)/init_env
7+
TESTNAME="core_auth"
8+
9+
# Import test functions
10+
. $TOOLS/functestlib.sh
11+
12+
test_path=$(find_test_case_by_name "$TESTNAME")
13+
log_info "-----------------------------------------------------------------------------------------"
14+
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
15+
16+
17+
# Print the start of the test case
18+
echo "-----------------------------------------------------------------------------------------"
19+
echo "-------------------Starting $TESTNAME Testcase----------------------------"
20+
21+
# Print a message to indicate checking for dependency binary
22+
echo "Checking if dependency binary is available"
23+
24+
# Set the library path for the IGT tests
25+
if [ -d "/data/" ] && [ -d "/data/igt/lib" ]; then
26+
# Set the LD_LIBRARY_PATH environment variable
27+
export LD_LIBRARY_PATH=/data/igt/lib
28+
echo "LD_LIBRARY_PATH is set to /data/igt/lib"
29+
else
30+
echo "Directory either /data/ or /data/igt/lib or both does not exist"
31+
exit 1
32+
fi
33+
34+
# Navigate to the directory containing the IGT tests
35+
cd /data/igt/tests/
36+
37+
# Run the core_auth test and log the output to a file
38+
./core_auth 2>&1 | tee /data/core_auth_log.txt
39+
40+
# Check the log file for the string "SUCCESS" to determine if the test passed
41+
if grep -q "SUCCESS" /data/core_auth_log.txt; then
42+
# If "SUCCESS" is found, print that the test passe
43+
log_pass "$TESTNAME : Test Passed"
44+
echo "$TESTNAME PASS" > $test_path/$TESTNAME.res
45+
46+
else
47+
# If "SUCCESS" is not found, print that the test failed
48+
log_pass "$TESTNAME : Test Failed"
49+
echo "$TESTNAME FAIL" > $test_path/$TESTNAME.res
50+
fi
51+
52+
# Print the completion of the test case
53+
echo "-------------------Completed $TESTNAME Testcase----------------------------"

0 commit comments

Comments
 (0)