Skip to content
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

Unit Test file for LegacyPlugin_WiFiAPIs.cpp #64

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
Apply patch file in the workflow to make test_LegacyPlugin_WiFiManage…
…rAPIs.cpp success
parvathika committed Jan 10, 2025
commit ea4552e1bd77050c5a8ded710805586d78979984
17 changes: 10 additions & 7 deletions .github/workflows/gnome_unit_test.yml
Original file line number Diff line number Diff line change
@@ -46,11 +46,20 @@ jobs:
cmake-version: '3.16.x'

- name: Checkout thunder repositories
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/rdkcentral/ThunderTools ThunderTools --branch ${{ env.THUNDER_REF }}
git clone https://github.com/rdkcentral/Thunder Thunder --branch ${{ env.THUNDER_REF }}
git clone https://github.com/rdkcentral/ThunderInterfaces ThunderInterfaces --branch ${{ env.THUNDER_REF }}

- name: Checkout networkmanager
uses: actions/checkout@v3
with:
path: networkmanager

- name: Apply Patches
run: |
cd ${{github.workspace}}/Thunder
git apply ${{github.workspace}}/networkmanager/Tests/patches/thunder/Remove-SmartLinkType.patch

- name: Build ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
@@ -64,7 +73,6 @@ jobs:
cmake --build build/ThunderTools --target install -j8

- name: Build Thunder
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/Thunder" -B build/Thunder
@@ -86,11 +94,6 @@ jobs:
&&
cmake --build build/ThunderInterfaces --target install -j8

- name: Checkout networkmanager
uses: actions/checkout@v3
with:
path: networkmanager

- name: Build networkmanager with Gnome Proxy
run: >
cmake
6 changes: 5 additions & 1 deletion LegacyPlugin_WiFiManagerAPIs.cpp
Original file line number Diff line number Diff line change
@@ -155,7 +155,11 @@ namespace WPEFramework
}
interface->Release();
}

else
{
NMLOG_ERROR("The call sign '%s' returns null", callsign.c_str());
return string() ;
}
Core::SystemInfo::SetEnvironment(_T("THUNDER_ACCESS"), (_T("127.0.0.1:9998")));
m_networkmanager = make_shared<WPEFramework::JSONRPC::SmartLinkType<WPEFramework::Core::JSON::IElement> >(_T(NETWORK_MANAGER_CALLSIGN), _T("org.rdk.Wifi"), query);

21 changes: 21 additions & 0 deletions Tests/patches/thunder/Remove-SmartLinkType.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h
index 9652d7ec..aad19ab1 100644
--- a/Source/websocket/JSONRPCLink.h
+++ b/Source/websocket/JSONRPCLink.h
@@ -1235,16 +1235,6 @@ namespace WPEFramework {
}

public:
- template <typename INBOUND, typename METHOD>
- uint32_t Subscribe(const uint32_t waitTime, const string& eventName, const METHOD& method)
- {
- return Subscribe<INBOUND, METHOD>(waitTime, eventName, method);
- }
- template <typename INBOUND, typename METHOD, typename REALOBJECT>
- uint32_t Subscribe(const uint32_t waitTime, const string& eventName, const METHOD& method, REALOBJECT* objectPtr)
- {
- return Subscribe<INBOUND, METHOD, REALOBJECT>(waitTime, eventName, method, objectPtr);
- }
bool IsActivated()
{
return (_state == ACTIVATED);
39 changes: 0 additions & 39 deletions Tests/unit_test/test_LegacyPlugin_NetworkAPIs.cpp

This file was deleted.