Commit d35f698d authored by johan's avatar johan
Browse files

name collision when building tests for android

parent 111734a1
master feature/encryption_plugin fix/runtime_errors release/4.2 release/4.3 release/4.4 release/4.5 release/5.0 release/5.1 release/5.2 release/5.3 release/5.4 5.5.0-alpha 5.4.7 5.4.2 5.4.1 5.4.0 5.4.0-beta 5.4.0-alpha 5.3.107 5.3.106 5.3.105 5.3.104 5.3.102 5.3.101 5.3.100 5.3.99 5.3.97 5.3.96 5.3.95 5.3.94 5.3.93 5.3.92 5.3.90 5.3.89 5.3.88 5.3.87 5.3.86 5.3.85 5.3.84 5.3.83 5.3.81 5.3.79 5.3.77 5.3.74 5.3.73 5.3.72 5.3.71 5.3.70 5.3.69 5.3.67 5.3.65 5.3.64 5.3.63 5.3.62 5.3.61 5.3.60 5.3.59 5.3.58 5.3.57 5.3.56 5.3.55 5.3.54 5.3.53 5.3.52 5.3.51 5.3.50 5.3.49 5.3.46 5.3.45 5.3.44 5.3.42 5.3.41 5.3.38 5.3.37 5.3.36 5.3.35 5.3.34 5.3.33 5.3.29 5.3.27 5.3.26 5.3.25 5.3.24 5.3.23 5.3.22 5.3.21 5.3.19 5.3.18 5.3.15 5.3.13 5.3.12 5.3.11 5.3.10 5.3.7 5.3.6 5.3.5 5.3.4 5.3.3 5.3.1 5.3.0 5.3.0-beta 5.3.0-alpha 5.2.114 5.2.113 5.2.112 5.2.111 5.2.109 5.2.108 5.2.107 5.2.106 5.2.105 5.2.102 5.2.100 5.2.98 5.2.97 5.2.95 5.2.94 5.2.93 5.2.91 5.2.89 5.2.86 5.2.85 5.2.83 5.2.76 5.2.73 5.2.71 5.2.70 5.2.64 5.2.63 5.2.58 5.2.57 5.2.54 5.2.53 5.2.52 5.2.51 5.2.49 5.2.45 5.2.37 5.2.32 5.2.30 5.2.29 5.2.28 5.2.27 5.2.26 5.2.25 5.2.23 5.2.22 5.2.21 5.2.16 5.2.12 5.2.11 5.2.9 5.2.6 5.2.5 5.2.4 5.2.2 5.2.0 5.2.0-alpha 5.1.72 5.1.71 5.1.67 5.1.66 5.1.64 5.1.61 5.1.58 5.1.55 5.1.51 5.1.45 5.1.44 5.1.32 5.1.31 5.1.12 5.1.10 5.1.3 5.1.2 5.1.0 5.1.0-alpha 5.0.71 5.0.70 5.0.68 5.0.67 5.0.66 5.0.63 5.0.62 5.0.61 5.0.58 5.0.55 5.0.53 5.0.51 5.0.50 5.0.49 5.0.46 5.0.44 5.0.37 5.0.36 5.0.32 5.0.28 5.0.27 5.0.26 5.0.24 5.0.23 5.0.22 5.0.18 5.0.16 5.0.15 5.0.13 5.0.11 5.0.8 5.0.5 5.0.3 5.0.0 5.0.0-alpha 4.5.22 4.5.20 4.5.15 4.5.14 4.5.13 4.5.10 4.5.7 4.5.3 4.5.1 4.5.0 4.5.0-alpha 4.4.34 4.4.33 4.4.32 4.4.31 4.4.29 4.4.28 4.4.27 4.4.26 4.4.25 4.4.24 4.4.22 4.4.21 4.4.19 4.4.18 4.4.17 4.4.16 4.4.13 4.4.12 4.4.10 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.0 4.4.0-alpha 4.3.1 4.3.0 4.3.0-beta 4.3.0-alpha
1 merge request!15JNI
Showing with 132 additions and 132 deletions
......@@ -29,14 +29,14 @@
using namespace::std;
using namespace::lime;
static belle_sip_stack_t *stack=NULL;
static belle_sip_stack_t *bc_stack=NULL;
static belle_http_provider_t *prov=NULL;
static int http_before_all(void) {
stack=belle_sip_stack_new(NULL);
bc_stack=belle_sip_stack_new(NULL);
prov=belle_sip_stack_create_http_provider(stack,"0.0.0.0");
prov=belle_sip_stack_create_http_provider(bc_stack,"0.0.0.0");
belle_tls_crypto_config_t *crypto_config=belle_tls_crypto_config_new();
......@@ -48,7 +48,7 @@ static int http_before_all(void) {
static int http_after_all(void) {
belle_sip_object_unref(prov);
belle_sip_object_unref(stack);
belle_sip_object_unref(bc_stack);
return 0;
}
......@@ -221,13 +221,13 @@ static void helloworld_basic_test(const lime::CurveId curve, const std::string &
aliceManager->create_user(tmp_aliceDeviceId, x3dh_server_url, curve, lime_tester::OPkInitialBatchSize, callback);
tmp_aliceDeviceId.clear(); // deviceId may go out of scope as soon as we come back from call
// wait for the operation to complete
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
auto tmp_bobDeviceId = *bobDeviceId; // use a temporary variable as it may be a local variable which get out of scope right after call to create_user
bobManager->create_user(tmp_bobDeviceId, x3dh_server_url, curve, callback);
tmp_bobDeviceId.clear(); // deviceId may go out of scope as soon as we come back from call
// wait for the operation to complete
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
/*** alice encrypt a message to bob, all parameters given to encrypt function are shared_ptr. ***/
......@@ -301,7 +301,7 @@ static void helloworld_basic_test(const lime::CurveId curve, const std::string &
/************** SYNCHRO **************************************/
// this is just waiting for the callback to increase the operation_success field in counters
// sending ticks to the belle-sip stack in order to process messages
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
LIME_LOGI<<"Alice encrypt the message, callback Ok or timeout reached"<<endl;
/****** end of SYNCHRO **************************************/
......@@ -347,13 +347,13 @@ static void helloworld_basic_test(const lime::CurveId curve, const std::string &
expected_success+=2;
/******* end of Users maintenance ****************************/
// wait for updates to complete
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,expected_success,lime_tester::wait_for_timeout));
// delete the users
if (cleanDatabase) {
aliceManager->delete_user(*aliceDeviceId, callback);
bobManager->delete_user(*bobDeviceId, callback);
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,expected_success+2,lime_tester::wait_for_timeout)); // we must get a callback saying all went well
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,expected_success+2,lime_tester::wait_for_timeout)); // we must get a callback saying all went well
remove(dbFilenameAlice.data());
remove(dbFilenameBob.data());
}
......@@ -432,13 +432,13 @@ static void helloworld_verifyIdentity_test(const lime::CurveId curve, const std:
aliceManager->create_user(tmp_aliceDeviceId, x3dh_server_url, curve, lime_tester::OPkInitialBatchSize, callback);
tmp_aliceDeviceId.clear(); // deviceId may go out of scope as soon as we come back from call
// wait for the operation to complete
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
auto tmp_bobDeviceId = *bobDeviceId; // use a temporary variable as it may be a local variable which get out of scope right after call to create_user
bobManager->create_user(tmp_bobDeviceId, x3dh_server_url, curve, callback);
tmp_bobDeviceId.clear(); // deviceId may go out of scope as soon as we come back from call
// wait for the operation to complete
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
// [verify] Retrieve from Managers Bob and Alice device Identity Key
std::vector<uint8_t> aliceIk{};
......@@ -538,7 +538,7 @@ static void helloworld_verifyIdentity_test(const lime::CurveId curve, const std:
/************** SYNCHRO **************************************/
// this is just waiting for the callback to increase the operation_success field in counters
// sending ticks to the belle-sip stack in order to process messages
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
LIME_LOGI<<"Alice encrypt the message, callback Ok or timeout reached"<<endl;
/****** end of SYNCHRO **************************************/
......@@ -588,13 +588,13 @@ static void helloworld_verifyIdentity_test(const lime::CurveId curve, const std:
expected_success+=2;
/******* end of Users maintenance ****************************/
// wait for updates to complete
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,expected_success,lime_tester::wait_for_timeout));
// delete the users
if (cleanDatabase) {
aliceManager->delete_user(*aliceDeviceId, callback);
bobManager->delete_user(*bobDeviceId, callback);
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,expected_success+2,lime_tester::wait_for_timeout)); // we must get a callback saying all went well
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,expected_success+2,lime_tester::wait_for_timeout)); // we must get a callback saying all went well
remove(dbFilenameAlice.data());
remove(dbFilenameBob.data());
}
......
This diff is collapsed.
......@@ -35,7 +35,7 @@
using namespace::std;
using namespace::lime;
static belle_sip_stack_t *stack=NULL;
static belle_sip_stack_t *bc_stack=NULL;
static belle_http_provider_t *prov=NULL;
// maximum runtime target for a bench run, the group size will be adjusted to match it
......@@ -43,9 +43,9 @@ static belle_http_provider_t *prov=NULL;
uint64_t maximumBenchTime = 120000; // in ms
static int http_before_all(void) {
stack=belle_sip_stack_new(NULL);
bc_stack=belle_sip_stack_new(NULL);
prov=belle_sip_stack_create_http_provider(stack,"0.0.0.0");
prov=belle_sip_stack_create_http_provider(bc_stack,"0.0.0.0");
belle_tls_crypto_config_t *crypto_config=belle_tls_crypto_config_new();
......@@ -57,7 +57,7 @@ static int http_before_all(void) {
static int http_after_all(void) {
belle_sip_object_unref(prov);
belle_sip_object_unref(stack);
belle_sip_object_unref(bc_stack);
return 0;
}
......@@ -191,7 +191,7 @@ static void group_basic_test(const lime::CurveId curve, const std::string &dbBas
// create user
manager->create_user(deviceId, x3dh_server_url, curve, lime_tester::OPkInitialBatchSize+i, callback); // give them at least <index> OPk at creation
expected_success++;
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success, expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success, expected_success,lime_tester::wait_for_timeout));
}
if (bench) {
......@@ -227,7 +227,7 @@ static void group_basic_test(const lime::CurveId curve, const std::string &dbBas
//encrypt
auto cipherMessage = make_shared<std::vector<uint8_t>>();
manager->encrypt(*(devicesId[senderIndex]), groupName, recipients, message, cipherMessage, callback);
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,++expected_success,lime_tester::wait_for_timeout));
if (bench) {
if (i==0) { // first run shall be the longest as we have deviceNumber-1 sessions to establish
......@@ -283,7 +283,7 @@ static void group_basic_test(const lime::CurveId curve, const std::string &dbBas
manager = std::unique_ptr<LimeManager>(new LimeManager(dbFilename[i], X3DHServerPost));
manager->delete_user(*(devicesId[i]), callback);
expected_success++;
BC_ASSERT_TRUE(lime_tester::wait_for(stack,&counters.operation_success,expected_success,lime_tester::wait_for_timeout));
BC_ASSERT_TRUE(lime_tester::wait_for(bc_stack,&counters.operation_success,expected_success,lime_tester::wait_for_timeout));
}
for (auto i=0; i<deviceNumber; i++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment