Skip to content

Commit

Permalink
Force hostname to be lower case, allow tests for os x
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ess committed May 30, 2024
1 parent bf1be27 commit 18d28e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
cross: "[email protected]"
test: NO

- os: macos-12
cmp: clang
configuration: default

steps:
- uses: actions/checkout@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion test/caPutJsonLogTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <osiSock.h>
#include <envDefs.h>
#include <errlog.h>
#include <epicsString.h>
#include <db_access.h>
#include <db_access_routines.h>
#include <dbUnitTest.h>
Expand Down Expand Up @@ -480,7 +481,9 @@ void commonTests(JsonParser &jsonParser, const char* pvname, const char * testPr
// Test hostname
char hostname[1024];
gethostname(hostname, 1024);
testOk(!jsonParser.host.compare(hostname),

// asLibRoutines changes the hostnames to lower-case; some OSs are not so kind.
testOk(!epicsStrCaseCmp(hostname, jsonParser.host.c_str()),
"%s - %s", testPrefix, "Hostname check");

// Test username
Expand Down

0 comments on commit 18d28e7

Please sign in to comment.