Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ os:

sudo: false

# Tests for cppunit require C++11 which requires gcc-4.8 or newer
# This is available in either "trusty" or newer distros, or in "docker" envs
#dist: trusty

services:
- docker

Expand Down Expand Up @@ -91,8 +95,9 @@ matrix:
- aspell-en
- env: BUILD_TYPE=default-tgt:distcheck-valgrind
os: linux
# dist: trusty
# sudo: required
sudo: false
services:
- docker
addons:
apt:
packages:
Expand All @@ -107,12 +112,18 @@ matrix:
- *deps_driverlibs
- env: BUILD_TYPE=default-alldrv
os: linux
sudo: false
services:
- docker
addons:
apt:
packages:
- *deps_driverlibs
- env: BUILD_TYPE=default-tgt:distcheck-light
os: linux
sudo: false
services:
- docker
addons:
apt:
packages:
Expand Down
3 changes: 1 addition & 2 deletions clients/upsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifdef HAVE_PTHREAD
/* this include is needed on AIX to have errno stored in thread local storage */
#include <pthread.h>
#endif
#endif

#include <errno.h>
#include <netdb.h>
Expand All @@ -37,7 +37,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/time.h>

#include "upsclient.h"
#include "common.h"
Expand Down
1 change: 1 addition & 0 deletions drivers/dstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifndef DSTATE_H_SEEN
#define DSTATE_H_SEEN 1

#include "timehead.h"
#include "state.h"
#include "attribute.h"

Expand Down
4 changes: 2 additions & 2 deletions drivers/eaton-pdu-marlin-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static snmp_info_t eaton_marlin_mib[] = {
SU_FLAG_STATIC | SU_FLAG_ABSENT | SU_FLAG_OK, NULL, NULL },
/* FIXME: needs a date reformating callback
* 2011-8-29,16:27:25.0,+1:0
* Hex-STRING: 07 DB 08 1D 10 0C 36 00 2B 01 00 00
* Hex-STRING: 07 DB 08 1D 10 0C 36 00 2B 01 00 00
* { "ups.date", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.8.0",
"", SU_FLAG_STATIC | SU_FLAG_OK, NULL, NULL },
* { "ups.time", ST_FLAG_STRING, SU_INFOSIZE, ".1.3.6.1.4.1.534.6.6.7.1.2.1.8.0",
Expand Down Expand Up @@ -500,7 +500,7 @@ static snmp_info_t eaton_marlin_mib[] = {

/* instant commands. */
/* Notes:
* - load.cycle might be replaced by / mapped on shutdown.reboot
* - load.cycle might be replaced by / mapped on shutdown.reboot
* - outletControl{Off,On,Reboot}Cmd values:
* 0-n : Timer
* -1 : Cancel
Expand Down
6 changes: 5 additions & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Network UPS Tools: tests

# Tests with gcc-4.8 require this C++11 option to be provided explicitly
# gcc-4.6 does not support this yet; newer gcc's should be ok by default
CPPUNIT_NUT_CFLAGS = -g -O0 -std=c++11

if HAVE_CPPUNIT

TESTS = cppunittest
Expand All @@ -11,7 +15,7 @@ check-local: $(check_PROGRAMS)
RES=0; for P in $^ ; do $(VALGRIND) ./$$P || { RES=$$? ; echo "FAILED: $(VALGRIND) ./$$P" >&2; }; done; exit $$RES
endif

cppunittest_CXXFLAGS = $(CPPUNIT_CFLAGS)
cppunittest_CXXFLAGS = $(CPPUNIT_CFLAGS) $(CPPUNIT_NUT_CFLAGS)
cppunittest_LDFLAGS = $(CPPUNIT_LIBS)
cppunittest_LDADD = ../clients/libnutclient.la

Expand Down