-
Notifications
You must be signed in to change notification settings - Fork 2
Topic/rdk 57502 #65
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
Abhinavpv28
wants to merge
21
commits into
develop
Choose a base branch
from
topic/RDK-57502
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Topic/rdk 57502 #65
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7dad5b0
Migration of logupload script
9841f30
Delete uploadutils/mtls_upload.h_bkp
Abhinavpv28 f6845ba
Delete uploadutils/mtls_upload.c_bkp
Abhinavpv28 33d358f
Add files via upload
Abhinavpv28 33c1cea
Add files via upload
Abhinavpv28 1905980
Update L1-Test.yaml
Abhinavpv28 7928144
Add files via upload
Abhinavpv28 41ed565
Add files via upload
Abhinavpv28 01aa7fa
Add files via upload
Abhinavpv28 58cd72b
Create Makefile.am
Abhinavpv28 02b0858
Add files via upload
Abhinavpv28 b34d530
Add files via upload
Abhinavpv28 e3a94d2
Add files via upload
Abhinavpv28 c69dbc7
Add files via upload
Abhinavpv28 a2c9afc
Add files via upload
Abhinavpv28 8067e1f
Rename Makefile.am to Makefile.am
Abhinavpv28 4a18ebb
Rename codebig_upload_gtest.cpp to codebig_upload_gtest.cpp
Abhinavpv28 90fb7c8
Rename configure.ac to configure.ac
Abhinavpv28 9c5704c
Rename mtls_upload_gtest.cpp to mtls_upload_gtest.cpp
Abhinavpv28 1e0d4aa
Rename uploadUtil_gtest.cpp to uploadUtil_gtest.cpp
Abhinavpv28 17f697c
Rename upload_status_gtest.cpp to upload_status_gtest.cpp
Abhinavpv28 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,58 @@ | ||
| name: Unit tests Common Utilities | ||
| name: L1 Unit Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ develop, main ] | ||
| push: | ||
| branches: [ topic/RDK-57502 ] | ||
|
|
||
| env: | ||
| AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }} | ||
| AUTOMATICS_PASSCODE: ${{ secrets.AUTOMATICS_PASSCODE }} | ||
|
|
||
| jobs: | ||
| execute-unit-tests-on-pr: | ||
| name: Execute unit tests in gtest test suite | ||
| execute-L1-tests-on-pr: | ||
| name: Execute L1 test suite in test container environment | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ghcr.io/rdkcentral/docker-rdk-ci:latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Pull test container image | ||
| run: docker pull ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest | ||
|
|
||
| - name: Start test container | ||
| run: | | ||
| docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest | ||
| - name: Run unit tests | ||
| run: sh unit_test.sh | ||
| - name: Run L1 Unit Tests inside container | ||
| run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh unit_test.sh" | ||
|
|
||
| - name: Upload test results to automatic test result management system | ||
| - name: Copy L1 test results to runner | ||
| run: | | ||
| docker cp native-platform:/tmp/Gtest_Report /tmp/Gtest_Report | ||
| ls -l /tmp/Gtest_Report | ||
| upload-test-results: | ||
| name: Upload L1 test results to automatic test result management system | ||
| needs: execute-L1-tests-on-pr | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ghcr.io/rdkcentral/docker-rdk-ci:latest | ||
| volumes: | ||
| - /tmp/Gtest_Report:/tmp/Gtest_Report | ||
|
|
||
| steps: | ||
| - name: Upload results | ||
| if: github.repository_owner == 'rdkcentral' | ||
| run: | | ||
| echo "Contents in /tmp/Gtest_Report:" | ||
| ls -l /tmp/Gtest_Report | ||
| git config --global --add safe.directory `pwd` | ||
| gtest-json-result-push.py /tmp/Gtest_Report https://rdkeorchestrationservice.apps.cloud.comcast.net/rdke_orchestration_api/push_unit_test_results `pwd` | ||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Copyright 2023 Comcast Cable Communications Management, LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
|
|
||
| AUTOMAKE_OPTIONS = subdir-objects | ||
|
|
||
| # Define the program name and the source files | ||
| bin_PROGRAMS = uploadUtil_gtest upload_status_gtest codebig_upload_gtest mtls_upload_gtest | ||
|
|
||
| # Define the include directories | ||
| COMMON_CPPFLAGS = -std=c++11 -I/usr/include/cjson -I../../utils -I../../mocks -I../../uploadutils -I../../dwnlutils -I../../parsejson -DGTEST_ENABLE -DLIBRDKCERTSELECTOR | ||
|
|
||
| # Define the libraries to link against | ||
| COMMON_LDADD = -lcjson -lgcov -lcurl -lgtest -lgtest_main -lgmock_main -lgmock -lfwutils -ldwnlutil | ||
|
|
||
| # Define the compiler flags | ||
| COMMON_CXXFLAGS = -frtti -fprofile-arcs -ftest-coverage -fpermissive | ||
|
|
||
| # Define the source files | ||
| uploadUtil_gtest_SOURCES = uploadUtil_gtest.cpp ../../uploadutils/uploadUtil.c ../../utils/rdkv_cdl_log_wrapper.c ../../parsejson/json_parse.c | ||
|
|
||
| upload_status_gtest_SOURCES = upload_status_gtest.cpp ../../uploadutils/upload_status.c ../../utils/rdkv_cdl_log_wrapper.c | ||
|
|
||
| codebig_upload_gtest_SOURCES = codebig_upload_gtest.cpp ../../uploadutils/codebig_upload.c ../../utils/rdkv_cdl_log_wrapper.c | ||
|
|
||
| mtls_upload_gtest_SOURCES = mtls_upload_gtest.cpp ../../uploadutils/mtls_upload.c ../../utils/rdkv_cdl_log_wrapper.c | ||
|
|
||
| # Apply common properties to each program | ||
| uploadUtil_gtest_CPPFLAGS = $(COMMON_CPPFLAGS) | ||
| uploadUtil_gtest_LDADD = $(COMMON_LDADD) | ||
| uploadUtil_gtest_CXXFLAGS = $(COMMON_CXXFLAGS) | ||
| uploadUtil_gtest_CFLAGS = $(COMMON_CXXFLAGS) | ||
|
|
||
| upload_status_gtest_CPPFLAGS = $(COMMON_CPPFLAGS) | ||
| upload_status_gtest_LDADD = $(COMMON_LDADD) | ||
| upload_status_gtest_CXXFLAGS = $(COMMON_CXXFLAGS) | ||
| upload_status_gtest_CFLAGS = $(COMMON_CXXFLAGS) | ||
|
|
||
| codebig_upload_gtest_CPPFLAGS = $(COMMON_CPPFLAGS) | ||
| codebig_upload_gtest_LDADD = $(COMMON_LDADD) | ||
| codebig_upload_gtest_CXXFLAGS = $(COMMON_CXXFLAGS) | ||
| codebig_upload_gtest_CFLAGS = $(COMMON_CXXFLAGS) | ||
|
|
||
| mtls_upload_gtest_CPPFLAGS = $(COMMON_CPPFLAGS) | ||
| mtls_upload_gtest_LDADD = $(COMMON_LDADD) | ||
| mtls_upload_gtest_CXXFLAGS = $(COMMON_CXXFLAGS) | ||
| mtls_upload_gtest_CFLAGS = $(COMMON_CXXFLAGS) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI about 23 hours ago
To fix this problem, an explicit
permissionsblock should be added to the workflow at the root or job level to restrict the GitHub Actions token to the minimum required privileges. In this workflow, only reading repository contents is necessary (for actions/checkout), socontents: readis sufficient. This permissions block can be placed at the top level of the workflow so that it applies to all jobs, unless a specific job requires additional permissions. Edit the.github/workflows/L1-Test.yamlfile to add:after the
name:block and before theon:block. No additional dependencies or code changes outside the workflow file are needed.