Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause-Clear
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove # from CR


# IGT Core Auth Test Script

## Overview

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.

## Features

- Comprehensive authentication tests
- Environment setup for required dependencies
- Detailed logging of test processes and results
- Color-coded pass/fail summaries
- Output stored in a structured results directory
- Auto-check for required libraries and dependencies
- Compatible with various Linux distributions

## Prerequisites

Ensure the following components are present in the target environment:

- Required authentication libraries and dependencies
- Write access to the filesystem (for environment setup and logging)

## Directory Structure
```bash
Runner/
├──suites/
├ ├── Multimedia/
│ ├ ├── Display/
│ ├ ├ ├── core_auth/
│ ├ ├ ├ ├ └── run.sh
├ ├ ├ ├ ├ └── Display_IGTTestValidation_Readme.md
```

## Usage

1. Copy the script to your target system and make it executable:

```bash
chmod +x run.sh
```

2. Run the script:

```bash
./run.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Add even the steps to run the core_auth test from run-test.sh

```

3. Logs and test results will be available in the `results/igt_core_auth` directory.

## Output

- **Validation Result**: Printed to console and saved in a results file with PASS/FAIL status.

## Notes

- The script does not take any arguments.
- It validates the presence of required libraries before executing tests.
- If any critical tool is missing, the script exits with an error message.

## Maintenance

- Ensure the authentication libraries remain compatible with your system.
- Update test cases as per new authentication requirements or updates in the IGT Core framework.

53 changes: 53 additions & 0 deletions Runner/suites/Multimedia/Display/core_auth/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/sh
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause-Clear

# Import test suite definitions
Copy link
Contributor

Choose a reason for hiding this comment

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

Please follow the standard procedure to source init_env and functestlib.sh. For more information, refer to the guidelines.

. $(pwd)/init_env
TESTNAME="core_auth"

# Import test functions
. $TOOLS/functestlib.sh

test_path=$(find_test_case_by_name "$TESTNAME")
log_info "-----------------------------------------------------------------------------------------"
log_info "-------------------Starting $TESTNAME Testcase----------------------------"


# Print the start of the test case
echo "-----------------------------------------------------------------------------------------"
echo "-------------------Starting $TESTNAME Testcase----------------------------"

# Print a message to indicate checking for dependency binary
echo "Checking if dependency binary is available"

# Set the library path for the IGT tests
if [ -d "/data/" ] && [ -d "/data/igt/lib" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

data folder won't be available on mainline builds.

# Set the LD_LIBRARY_PATH environment variable
export LD_LIBRARY_PATH=/data/igt/lib
echo "LD_LIBRARY_PATH is set to /data/igt/lib"
else
echo "Directory either /data/ or /data/igt/lib or both does not exist"
exit 1
fi

# Navigate to the directory containing the IGT tests
cd /data/igt/tests/
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of this, better launch the core_auth from the relative path.


# Run the core_auth test and log the output to a file
./core_auth 2>&1 | tee /data/core_auth_log.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you check if core_auth is available first?


# Check the log file for the string "SUCCESS" to determine if the test passed
if grep -q "SUCCESS" /data/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

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

# Print the completion of the test case
echo "-------------------Completed $TESTNAME Testcase----------------------------"
Loading