Skip to content

Commit 81f53b8

Browse files
author
Manasa Bethapalli
committed
added display test
Signed-off-by: Manasa Bethapalli <[email protected]>
1 parent ec8d3f1 commit 81f53b8

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Sure, here is a README for the IGT Core Auth Test:
2+
3+
# IGT Core Auth Test Script
4+
5+
## Overview
6+
7+
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.
8+
9+
## Features
10+
11+
- Comprehensive authentication tests
12+
- Environment setup for required dependencies
13+
- Detailed logging of test processes and results
14+
- Color-coded pass/fail summaries
15+
- Output stored in a structured results directory
16+
- Auto-check for required libraries and dependencies
17+
- Compatible with various Linux distributions
18+
19+
## Prerequisites
20+
21+
Ensure the following components are present in the target environment:
22+
23+
- Required authentication libraries and dependencies
24+
- Write access to the filesystem (for environment setup and logging)
25+
26+
## Directory Structure
27+
28+
```bash
29+
results/
30+
├── igt_core_auth/
31+
│ ├── auth_test_<test>.txt
32+
│ ├── dmesg_log.txt
33+
│ └── syslog_log.txt
34+
```
35+
36+
## Usage
37+
38+
1. Copy the script to your target system and make it executable:
39+
40+
```bash
41+
chmod +x igt_core_auth_test.sh
42+
```
43+
44+
2. Run the script:
45+
46+
```bash
47+
./igt_core_auth_test.sh
48+
```
49+
50+
3. Logs and test results will be available in the `results/igt_core_auth` directory.
51+
52+
## Output
53+
54+
- **Test Logs**: Stored in individual files for each test variant.
55+
- **Kernel Logs**: Captured via `dmesg` and `syslog`.
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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/sh
2+
# Import test suite definitions
3+
. $(pwd)/init_env
4+
TESTNAME="core_auth"
5+
6+
# Import test functions
7+
. $TOOLS/functestlib.sh
8+
9+
test_path=$(find_test_case_by_name "$TESTNAME")
10+
log_info "-----------------------------------------------------------------------------------------"
11+
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
12+
13+
14+
# Print the start of the test case
15+
echo "-----------------------------------------------------------------------------------------"
16+
echo "-------------------Starting $TESTNAME Testcase----------------------------"
17+
18+
# Print a message to indicate checking for dependency binary
19+
echo "Checking if dependency binary is available"
20+
21+
# Set the library path for the IGT tests
22+
LD_LIBRARY_PATH=/data/igt/lib
23+
export LD_LIBRARY_PATH
24+
25+
# Navigate to the directory containing the IGT tests
26+
cd /data/igt/tests/
27+
28+
# Run the core_auth test and log the output to a file
29+
./core_auth 2>&1 | tee /data/core_auth_log.txt
30+
31+
# Check the log file for the string "SUCCESS" to determine if the test passed
32+
if grep -q "SUCCESS" /data/core_auth_log.txt; then
33+
# If "SUCCESS" is found, print that the test passe
34+
log_pass "$TESTNAME : Test Passed"
35+
echo "$TESTNAME PASS" > $test_path/$TESTNAME.res
36+
37+
else
38+
# If "SUCCESS" is not found, print that the test failed
39+
log_pass "$TESTNAME : Test Failed"
40+
echo "$TESTNAME Fail" > $test_path/$TESTNAME.res
41+
fi
42+
43+
# Print the completion of the test case
44+
echo "-------------------Completed $TESTNAME Testcase----------------------------"
45+
46+
47+
48+

0 commit comments

Comments
 (0)