Skip to content

Added Display IGT Test #28

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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,66 @@
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause-Clear

# IGT Core Auth Test Script
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add Qualcomm copyright and SPDX header.


## 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
results/
├── igt_core_auth/
│ ├── auth_test_<test>.txt

```

## 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
```

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.

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

#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

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

shebang must be the first line in the script.

# 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 add Qualcomm copyright and SPDX header.

. $(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
    # 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.

Please check whether the path exists

Copy link
Author

Choose a reason for hiding this comment

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

added the check in next commit


# 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.

Please ensude /data/ directory exists before saving logs there.

Copy link
Author

Choose a reason for hiding this comment

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

added the check in next commit


# 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----------------------------"

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove empty lines at the end of the script




Loading