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

Adamds/device advisor integration #16

Merged
merged 9 commits into from
May 16, 2022
44 changes: 19 additions & 25 deletions examples/evkbmimxrt1060/test/app_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "test_execution_config.h"


#define appmainRUN_DEVICE_ADVISOR_TEST_SUITE ( 0 )

#define appmainPROVISIONING_MODE ( 0 )


Expand Down Expand Up @@ -70,6 +68,25 @@ extern void vCLITask( void * pvParam );

extern void vOTAUpdateTask( void * pvParam );

int RunDeviceAdvisorDemo( void )
{
BaseType_t xResult = pdFAIL;
if( xResult == pdPASS )
{
xResult = xMQTTAgentInit( appmainMQTT_AGENT_TASK_STACK_SIZE, appmainMQTT_AGENT_TASK_PRIORITY );
adam-scislowicz marked this conversation as resolved.
Show resolved Hide resolved
}

if( xResult == pdPASS )
{
xResult = xTaskCreate( vSubscribePublishTestTask,
"TEST",
appmainTEST_TASK_STACK_SIZE,
NULL,
appmainTEST_TASK_PRIORITY,
NULL );
}
adam-scislowicz marked this conversation as resolved.
Show resolved Hide resolved
}

int app_main( void )
{
BaseType_t xResult = pdFAIL;
Expand Down Expand Up @@ -126,28 +143,5 @@ int app_main( void )
}
}



#if ( appmainRUN_DEVICE_ADVISOR_TEST_SUITE == 1 )
{
if( xResult == pdPASS )
{
xResult = xMQTTAgentInit( appmainMQTT_AGENT_TASK_STACK_SIZE, appmainMQTT_AGENT_TASK_PRIORITY );
}

if( xResult == pdPASS )
{
xResult = xTaskCreate( vSubscribePublishTestTask,
"TEST",
appmainTEST_TASK_STACK_SIZE,
NULL,
appmainTEST_TASK_PRIORITY,
NULL );
}
}
#endif /* if ( appmainRUN_DEVICE_ADVISOR_TEST_SUITE == 1 ) */



return pdPASS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
#ifndef TEST_EXECUTION_CONFIG_H
#define TEST_EXECUTION_CONFIG_H

/**
* @brief Configuration to enable Device Advisor testing.
*
* #define DEVICE_ADVISOR_TEST_ENABLED (0)
*/
#define DEVICE_ADVISOR_TEST_ENABLED ( 0 )

/**
* @brief Configuration to enable the MQTT test.
*
Expand Down