-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/copilot twostage #66
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
50
commits into
develop
Choose a base branch
from
feature/copilot_twostage
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
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
fed0d6c
logupload
892db87
Add files via upload
Abhinavpv28 22ada22
Update Makefile.am
Abhinavpv28 664cb05
Add support for CPC code in configure.ac
Abhinavpv28 94c1146
Create readme.doc
Abhinavpv28 e077ed1
Add files via upload
Abhinavpv28 ff77009
Delete uploadutil directory
Abhinavpv28 baec6d6
Delete uploadutils/readme.doc
Abhinavpv28 28a87e7
Update Makefile.am
Abhinavpv28 7b93c34
Update system_utils.c
Abhinavpv28 e008a8f
Remove get_system_uptime function declaration
Abhinavpv28 49bf54c
Update upload_status.c
Abhinavpv28 c72bc92
Update upload_status.h
Abhinavpv28 37a7e24
Add files via upload
Abhinavpv28 a7d8e7a
Add files via upload
Abhinavpv28 97927a5
Update mtls_upload.c
Abhinavpv28 97af4b7
Add files via upload
Abhinavpv28 c796ea2
Refactor GitHub Actions for L1 Unit Tests
Abhinavpv28 a2f6259
Add codebigUtils.c with utility functions
Abhinavpv28 97cddeb
Add codebigUtils.h header file with utility functions
Abhinavpv28 c7914ab
Update Makefile.am
Abhinavpv28 d320f1d
Update codebigUtils.c
Abhinavpv28 0dbf467
Update Makefile.am
Abhinavpv28 2c754a9
Add files via upload
Abhinavpv28 5a1b800
Update unit_test.sh
Abhinavpv28 c44ad0c
Update unit_test.sh
Abhinavpv28 3c40e7e
Update unit_test.sh
Abhinavpv28 88ce0f9
Update uploadUtil.c
Abhinavpv28 24a8f90
Change copyright from Comcast to RDK Management
Abhinavpv28 2dbe8aa
Update copyright notice format in Makefile.am
Abhinavpv28 4d6f84f
Update codebigUtils.h
Abhinavpv28 22c8ff1
Restore copyright and documentation comments
Abhinavpv28 38711d7
Update codebig_upload.h
Abhinavpv28 f3f4ad2
Update mtls_upload.c
Abhinavpv28 7b3b6d8
Restore copyright and documentation comments
Abhinavpv28 1819c6f
Restore copyright and documentation comments
Abhinavpv28 c578907
Update Makefile.am
Abhinavpv28 586da49
Update comment block format in codebig_upload_gtest.cpp
Abhinavpv28 eb571b8
Update mtls_upload_gtest.cpp
Abhinavpv28 3aecb98
Update copyright notice in uploadUtil_gtest.cpp
Abhinavpv28 d428ca6
Update copyright header in upload_status_gtest.cpp
Abhinavpv28 b4f753b
Fix copyright notice formatting in codebigUtils.c
Abhinavpv28 8a050c1
Update codebigUtils.h
Abhinavpv28 98e22d8
Update codebig_upload_gtest.cpp
Abhinavpv28 b818a4d
Update codebig_upload_gtest.cpp
Abhinavpv28 8800604
Update codebig_upload_gtest.cpp
Abhinavpv28 6a4c14b
Clean up comments in codebig_upload_gtest.cpp
Abhinavpv28 e647f73
Update codebig_upload_gtest.cpp
Abhinavpv28 113b3a1
Clean up codebig_upload_gtest.cpp
Abhinavpv28 028edf9
Update CFLAGS for libuploadutil with LIBRDKCERTSEL_FLAG
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: [ feature/copilot_twostage ] | ||
|
|
||
| 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 2 months ago
To fix the problem, explicitly add a
permissionsblock to the workflow, restricting the permissions of the GITHUB_TOKEN to the minimum required to complete the workflow tasks. In this context, settingcontents: readat the workflow root is appropriate and restricts repository access to read-only for all jobs (unless overridden per-job). This change should be made near the top of the YAML, right after the workflowname, but beforeonso that it applies globally. No code outside this YAML file needs to be modified, no imports are required, and no existing functionality changes.