diff --git a/.github/workflows/L2-tests.yml b/.github/workflows/L2-tests.yml index 12641d94..4e5099a3 100644 --- a/.github/workflows/L2-tests.yml +++ b/.github/workflows/L2-tests.yml @@ -66,10 +66,34 @@ jobs: run: | docker run -d --name native-platform --link mockxconf -v ${{ github.workspace }}:/mnt/L2_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest + - name: Build RFC and Run L2 inside Native Platform Container run: | docker exec -i native-platform /bin/bash -c "cd /mnt/L2_CONTAINER_SHARED_VOLUME/ && sh ./cov_build.sh && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu:/usr/local/lib && sh run_l2.sh" + - name: Enable core dump + run: ulimit -c unlimited + + - name: Debug parodus binary + run: | + pwd + ls -l /usr/local/bin + file /usr/local/bin/parodus + ldd /usr/local/bin/parodus || true + + - name: Run test + run: | + cd /usr/local/bin + ./parodus '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload","dataType":0,"value":"TESTIMAGE_DEV.bin"}]}' + + - name: Print stacktrace + if: failure() + run: | + core=$(ls core* 2>/dev/null | head -n1) + if [ -n "$core" ]; then + gdb -batch -ex "bt full" /tmp/parodus $core + fi + - name: Copy unknown-accountid-xconf-rfc-response json to mockxconf service run: | docker cp ${{ github.workspace }}/test/test-artifacts/mockxconf/xconf-rfc-response-unknown-accountid.json mockxconf:/etc/xconf/xconf-rfc-response.json diff --git a/run_l2.sh b/run_l2.sh index be746ca9..0826b924 100644 --- a/run_l2.sh +++ b/run_l2.sh @@ -25,46 +25,9 @@ cp ./rfc.properties /opt/rfc.properties cp /opt/certs/client.pem /etc/ssl/certs/client.pem cp ./rfcMgr/gtest/mocks/tr181store.ini /opt/secure/RFC/tr181store.ini -rbuscli set Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ConfigSetTime uint32 1763118860 +ls -l /usr/local/bin/parodus -# Run L2 Test cases -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_single_instance_run.json test/functional-tests/tests/test_rfc_single_instance_run.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_device_offline.json test/functional-tests/tests/test_rfc_device_offline_status.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_init_failure.json test/functional-tests/tests/test_rfc_initialization_failure.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_communication_success.json test/functional-tests/tests/test_rfc_xconf_communication.py - - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_setget_param.json test/functional-tests/tests/test_rfc_setget_param.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_tr181_setget_local_param.json test/functional-tests/tests/test_rfc_tr181_setget_local_param.py - -# The cert selector test cases are commented for now. Once the code changes are moved to open source, it will be enabled. -#pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_dynamic_static_cert_selector.json test/functional-tests/tests/test_rfc_dynamic_static_cert_selector.py - -#pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_static_cert_selector.json test/functional-tests/tests/test_rfc_static_cert_selector.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_rfc_data.json test/functional-tests/tests/test_rfc_xconf_rfc_data.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_request_params.json test/functional-tests/tests/test_rfc_xconf_request_params.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_valid_accountid.json test/functional-tests/tests/test_rfc_valid_accountid.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_factory_reset.json test/functional-tests/tests/test_rfc_factory_reset.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_trigger_reboot_unknown_accountid.json test/functional-tests/tests/test_rfc_trigger_reboot.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_feature_enable.json test/functional-tests/tests/test_rfc_feature_enable.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_configsethash_time.json test/functional-tests/tests/test_rfc_xconf_configsethash_time.py - -echo "ENABLE_MAINTENANCE=true" >> /etc/device.properties - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_reboot.json test/functional-tests/tests/test_rfc_xconf_reboot.py - -pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_override_rfc_prop.json test/functional-tests/tests/test_rfc_override_rfc_prop.py +cp /usr/local/bin/parodus /tmp/parodus #pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_rfc_webpa.json test/functional-tests/tests/test_rfc_webpa.py diff --git a/test/functional-tests/tests/test_rfc_webpa.py b/test/functional-tests/tests/test_rfc_webpa.py index 848e0748..1da7e183 100644 --- a/test/functional-tests/tests/test_rfc_webpa.py +++ b/test/functional-tests/tests/test_rfc_webpa.py @@ -21,8 +21,8 @@ def test_WebPA_Set_ACC_Id(): print("Starting parodus mock process") - payload = '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AccountInfo.AccountID","dataType":0,"value":"412370664406228514"}]}' - command = ["/usr/local/bin/parodus", payload] + payload = '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload","dataType":0,"value":"TESTIMAGE_DEV.bin"}]}' + command = ["/tmp/parodus", payload] result = subprocess.run(command, capture_output=True, text=True) assert result.returncode == 0, f"Command failed with error: {result.stderr}" @@ -36,7 +36,7 @@ def test_WebPA_Set_ACC_Id(): def test_WebPA_Get_ACC_Id(): print("Starting parodus mock process") payload ='{"command":"GET","names":["Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AccountInfo.AccountID"]}' - command = ["/usr/local/bin/parodus", payload] + command = ["/tmp/parodus", payload] result = subprocess.run(command, capture_output=True, text=True) assert result.returncode == 0, f"Command failed with error: {result.stderr}"