|
1 | 1 | /* |
2 | 2 | Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
3 | | - 2016, 2019 MariaDB Corporation AB |
| 3 | + 2016, 2025 MariaDB Corporation AB |
4 | 4 |
|
5 | 5 | The MySQL Connector/ODBC is licensed under the terms of the GPLv2 |
6 | 6 | <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most |
@@ -141,7 +141,14 @@ ODBC_TEST(connstring_test) |
141 | 141 | VERIFY_OPTIONS(Dsn, MADB_OPT_FLAG_COMPRESSED_PROTO|MADB_OPT_FLAG_AUTO_RECONNECT|MADB_OPT_FLAG_NO_PROMPT); |
142 | 142 | IS_STR(Dsn->Description, Description, strlen(Description) + 1); |
143 | 143 |
|
144 | | - FAIL_IF(CreateTestDsn(Dsn) == FAIL, "Failed to create test DSN"); |
| 144 | + if (CreateTestDsn(Dsn) == FAIL) |
| 145 | + { |
| 146 | + if (GithubActionsOnMacos) |
| 147 | + { |
| 148 | + skip("Skipping - could not add the DSN"); |
| 149 | + } |
| 150 | + FAIL_IF(TRUE, "Failed to create test DSN"); |
| 151 | + } |
145 | 152 | IS(MADB_DSN_Exists(DsnName)); |
146 | 153 |
|
147 | 154 | RESET_DSN(Dsn); |
@@ -209,7 +216,14 @@ ODBC_TEST(options_test) |
209 | 216 |
|
210 | 217 | VERIFY_OPTIONS(Dsn, bit); |
211 | 218 |
|
212 | | - IS(CreateTestDsn(Dsn)); |
| 219 | + if (CreateTestDsn(Dsn) == FAIL) |
| 220 | + { |
| 221 | + if (GithubActionsOnMacos) |
| 222 | + { |
| 223 | + skip("Skipping - could not add the DSN"); |
| 224 | + } |
| 225 | + FAIL_IF(TRUE, "Failed to create test DSN"); |
| 226 | + } |
213 | 227 |
|
214 | 228 | RESET_DSN(Dsn); |
215 | 229 |
|
@@ -250,7 +264,14 @@ ODBC_TEST(all_other_fields_test) |
250 | 264 | the (new) DSN only once, or by creating new DSN for each keyword. */ |
251 | 265 | skip("Skipping with test in Travis"); |
252 | 266 | } |
253 | | - FAIL_IF(!MADB_DSN_Exists(DsnName), "Something went wrong - DSN does not exsist"); |
| 267 | + if (!MADB_DSN_Exists(DsnName)) |
| 268 | + { |
| 269 | + if (GithubActionsOnMacos) |
| 270 | + { |
| 271 | + skip("Skipping - could not add the DSN"); |
| 272 | + } |
| 273 | + FAIL_IF(TRUE, "Something went wrong - DSN does not exsist"); |
| 274 | + } |
254 | 275 |
|
255 | 276 | while(DsnKeys[i].DsnKey != NULL) |
256 | 277 | { |
@@ -332,7 +353,14 @@ ODBC_TEST(aliases_tests) |
332 | 353 | unsigned int options= 0xf0f0f0f0; |
333 | 354 | unsigned int option= ~options; |
334 | 355 |
|
335 | | - FAIL_IF(!MADB_DSN_Exists(DsnName), "Something went wrong - DSN does not exsist"); |
| 356 | + if (!MADB_DSN_Exists(DsnName)) |
| 357 | + { |
| 358 | + if (GithubActionsOnMacos) |
| 359 | + { |
| 360 | + skip("Skipping - could not add the DSN"); |
| 361 | + } |
| 362 | + FAIL_IF(TRUE, "Something went wrong - DSN does not exsist"); |
| 363 | + } |
336 | 364 |
|
337 | 365 | RESET_DSN(Dsn); |
338 | 366 |
|
@@ -383,7 +411,14 @@ ODBC_TEST(dependent_fields) |
383 | 411 | const char *LocalConnStr= "DSN=madb_connstr_dependent_fields"; |
384 | 412 | char connstr4dsn[512]; |
385 | 413 |
|
386 | | - FAIL_IF(!MADB_DSN_Exists(DsnName), "Something went wrong - DSN does not exsist"); |
| 414 | + if (!MADB_DSN_Exists(DsnName)) |
| 415 | + { |
| 416 | + if (GithubActionsOnMacos) |
| 417 | + { |
| 418 | + skip("Skipping - could not add the DSN"); |
| 419 | + } |
| 420 | + FAIL_IF(TRUE, "Something went wrong - DSN does not exsist"); |
| 421 | + } |
387 | 422 |
|
388 | 423 | RESET_DSN(Dsn); |
389 | 424 |
|
@@ -428,7 +463,14 @@ ODBC_TEST(driver_vs_dsn) |
428 | 463 | { |
429 | 464 | char connstr4dsn[512]; |
430 | 465 |
|
431 | | - FAIL_IF(!MADB_DSN_Exists(DsnName), "Something went wrong - DSN does not exsist"); |
| 466 | + if (!MADB_DSN_Exists(DsnName)) |
| 467 | + { |
| 468 | + if (GithubActionsOnMacos) |
| 469 | + { |
| 470 | + skip("Skipping - could not add the DSN"); |
| 471 | + } |
| 472 | + FAIL_IF(TRUE, "Something went wrong - DSN does not exsist"); |
| 473 | + } |
432 | 474 |
|
433 | 475 | RESET_DSN(Dsn); |
434 | 476 |
|
@@ -473,7 +515,15 @@ ODBC_TEST(odbc_188) |
473 | 515 | VERIFY_OPTIONS(Dsn, MADB_OPT_FLAG_COMPRESSED_PROTO|MADB_OPT_FLAG_AUTO_RECONNECT|MADB_OPT_FLAG_NO_PROMPT); |
474 | 516 | IS_STR(Dsn->Description, Description, strlen(Description) + 1); |
475 | 517 |
|
476 | | - FAIL_IF(CreateTestDsn(Dsn) == FAIL, "Failed to create test DSN"); |
| 518 | + if (CreateTestDsn(Dsn) == FAIL) |
| 519 | + { |
| 520 | + if (GithubActionsOnMacos) |
| 521 | + { |
| 522 | + skip("Skipping - could not add the DSN"); |
| 523 | + } |
| 524 | + FAIL_IF(TRUE, "Failed to create test DSN"); |
| 525 | + } |
| 526 | + |
477 | 527 | IS(MADB_DSN_Exists(DsnName)); |
478 | 528 |
|
479 | 529 | RESET_DSN(Dsn); |
@@ -537,7 +587,14 @@ ODBC_TEST(odbc_229) |
537 | 587 |
|
538 | 588 | IS(Dsn->Options & MADB_OPT_FLAG_USE_CNF); |
539 | 589 |
|
540 | | - IS(CreateTestDsn(Dsn)); |
| 590 | + if (CreateTestDsn(Dsn) == FAIL) |
| 591 | + { |
| 592 | + if (GithubActionsOnMacos) |
| 593 | + { |
| 594 | + skip("Skipping - could not add the DSN"); |
| 595 | + } |
| 596 | + FAIL_IF(TRUE, "Failed to create test DSN"); |
| 597 | + } |
541 | 598 |
|
542 | 599 | RESET_DSN(Dsn); |
543 | 600 |
|
@@ -569,7 +626,14 @@ ODBC_TEST(odbc_228) |
569 | 626 | is_num(Dsn->TlsVersion, MADB_TLSV11|MADB_TLSV13); |
570 | 627 | is_num(Dsn->Port, 3307); |
571 | 628 |
|
572 | | - IS(CreateTestDsn(Dsn)); |
| 629 | + if (CreateTestDsn(Dsn) == FAIL) |
| 630 | + { |
| 631 | + if (GithubActionsOnMacos) |
| 632 | + { |
| 633 | + skip("Skipping - could not add the DSN"); |
| 634 | + } |
| 635 | + FAIL_IF(TRUE, "Failed to create test DSN"); |
| 636 | + } |
573 | 637 |
|
574 | 638 | RESET_DSN(Dsn); |
575 | 639 |
|
|
0 commit comments