diff --git a/Makefile b/Makefile index 2b59714..2053be1 100644 --- a/Makefile +++ b/Makefile @@ -455,11 +455,11 @@ collect_copyrights: 3rdparty/xmq/build/default/release/xmq: $(wildcard 3rdparty/xmq/src/main/c/* 3rdparty/xmq/src/main/c/parts/*) @mkdir -p 3rdparty - @(cd 3rdparty; git clone https://github.com/libxmq/xmq.git; cd xmq; ./configure; make; make test) + @(cd 3rdparty; git clone https://github.com/libxmq/xmq.git; cd xmq; ./configure) + @if [ "$(cat build/default/spec.mk | grep CC)" = "CC:=gcc" ]; then (cd 3rdparty/xmq; make) ; else rm -f $@ ; mkdir -p $$(dirname $@); touch $@ ; echo "Could not build xmq." ; fi build/xmq: 3rdparty/xmq/build/default/release/xmq @cp $< $@ - @if [ "$(build/xmq --version ; echo $?)" != "0" ]; then echo "Failed to build a working xmq!"; fi # Include dependency information generated by gcc in a previous compile. include $(wildcard $(patsubst %.o,%.d,$(PROG_OBJS) $(DRIVER_OBJS))) diff --git a/src/main.cc b/src/main.cc index 8c5ce83..1f30e3c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -311,6 +311,8 @@ void list_fields(Configuration *config, string meter_driver) void list_meters(Configuration *config) { + loadAllBuiltinDrivers(); + for (DriverInfo *di : allDrivers()) { string mname = di->name().str(); diff --git a/test.sh b/test.sh index 6ae314d..17e2940 100755 --- a/test.sh +++ b/test.sh @@ -169,7 +169,12 @@ if [ "$?" != "0" ]; then RC="1"; fi ./tests/test_rtlwmbus_timestamps.sh $PROG if [ "$?" != "0" ]; then RC="1"; fi -./build/xmq tests/generated_tests.xmq for-each /test --shell='./tests/testit.sh '$PROG' "${args}" "${telegram}" "${json}" "${fields}"' +if [ -s build/xmq ] +then + ./build/xmq tests/generated_tests.xmq for-each /test --shell='./tests/testit.sh '$PROG' "${args}" "${telegram}" "${json}" "${fields}"' +else + echo "Skipping tests/generated_tests.xmq since xmq is missing." +fi ./tests/test_drivers.sh $PROG if [ "$?" != "0" ]; then RC="1"; fi