Merge branch '3.15' into 7.0

* 3.15:
  minor epicsTimerTest
  epicsTimerTest loosen test threshold
  debug epicsTimerTest
  posix/epicsMath.h
  Revert "libcom: fix colliding isnan/isinf between C99 and C++0x for gcc-4"
  Revert "libcom: properly declare isnan() in C++ code"
  travis-ci /etc/hosts workaround
  redo travis-ci with matrix
  epicsSockResolveTest add detail
  libcom: properly declare isnan() in C++ code
  libcom: fix colliding isnan/isinf between C99 and C++0x for gcc-4
  libcom: import some C99 math (isnan etc.) into global namespace

# Conflicts:
#	.travis.yml
#	ci/travis-prepare.sh
This commit is contained in:
Michael Davidsaver
2019-12-16 14:50:49 -08:00
5 changed files with 91 additions and 18 deletions

View File

@@ -68,7 +68,7 @@ EOF
type qemu-system-i386 || echo "Missing qemu"
fi
make -j2 $EXTRA
make -j2 RTEMS_QEMU_FIXUPS=YES CMD_CFLAGS="${CMD_CFLAGS}" CMD_CXXFLAGS="${CMD_CXXFLAGS}" CMD_LDFLAGS="${CMD_LDFLAGS}"
if [ "$TEST" != "NO" ]
then

24
.ci/travis-prepare.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
set -e -x
die() {
echo "$1" >&2
exit 1
}
if [ -f /etc/hosts ]
then
# The travis-ci "bionic" image throws us a curveball in /etc/hosts
# by including two entries for localhost. The first for 127.0.1.1
# which causes epicsSockResolveTest to fail.
# cat /etc/hosts
# ...
# 127.0.1.1 localhost localhost ip4-loopback
# 127.0.0.1 localhost nettuno travis vagrant travis-job-....
sudo sed -i -e '/^127\.0\.1\.1/ s|localhost\s*||g' /etc/hosts
echo "==== /etc/hosts"
cat /etc/hosts
echo "===="
fi

View File

@@ -1,8 +1,54 @@
sudo: false
dist: trusty
language: c
compiler:
- gcc
matrix:
include:
- sudo: false
dist: bionic
compiler: gcc
env: CMPLR=gcc
- sudo: false
dist: xenial
compiler: gcc
env: CMPLR=gcc
- sudo: false
dist: bionic
compiler: gcc
env: CMPLR=gcc CMD_CXXFLAGS=-std=c++11
- sudo: false
dist: trusty
compiler: gcc
env: CMPLR=gcc STATIC=YES
- sudo: false
dist: bionic
compiler: gcc
env: CMPLR=clang
- sudo: false
dist: xenial
compiler: gcc
env: CMPLR=clang
- sudo: false
dist: trusty
compiler: gcc
env: CMPLR=clang STATIC=YES
- sudo: false
dist: trusty
compiler: gcc
env: WINE=32 TEST=NO STATIC=YES
- sudo: false
dist: trusty
compiler: gcc
env: WINE=32 TEST=NO STATIC=NO
- sudo: false
dist: trusty
compiler: gcc
env: RTEMS=4.10
- sudo: false
dist: trusty
compiler: gcc
env: RTEMS=4.9
- os: osx
env: CMD_CFLAGS="-mmacosx-version-min=10.7" CMD_CXXFLAGS="-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++" CMD_LDXFLAGS="-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++"
addons:
apt:
packages:
@@ -13,15 +59,5 @@ addons:
- g++-mingw-w64-i686
- qemu-system-x86
script:
- .ci/travis-prepare.sh
- .ci/travis-build.sh
env:
- CMPLR=gcc EXTRA=LINKER_USE_RPATH=ORIGIN
- CMPLR=clang
- CMPLR=gcc STATIC=YES
- CMPLR=clang STATIC=YES
- CMPLR=gcc EXTRA=CMD_CXXFLAGS=-std=c++11
- CMPLR=clang EXTRA=CMD_CXXFLAGS=-std=c++11
- WINE=32 TEST=NO STATIC=YES
- WINE=32 TEST=NO STATIC=NO
- RTEMS=4.10 TEST=YES
- RTEMS=4.9 TEST=YES

View File

@@ -14,6 +14,16 @@
#include <shareLib.h>
#ifdef __cplusplus
#if __cplusplus>=201103L
#include <cmath>
using std::isfinite;
using std::isinf;
using std::isnan;
using std::isnormal;
#endif
extern "C" {
#endif

View File

@@ -75,8 +75,11 @@ MAIN(epicsSockResolveTest)
testSkip(2, " aToIPAddr() failed");
}
else {
testOk(addr.sin_addr.s_addr == htonl(okdata[i].IP), " IP correct");
testOk(addr.sin_port == htons(okdata[i].port), " Port correct");
testOk(addr.sin_addr.s_addr == htonl(okdata[i].IP),
" IP correct 0x%08x == 0x%08x", (unsigned)ntohl(addr.sin_addr.s_addr),
(unsigned)okdata[i].IP);
testOk(addr.sin_port == htons(okdata[i].port), " Port correct %u == %u",
ntohs(addr.sin_port), okdata[i].port);
}
}