From 47e6e7c84f008a53061e661f31ae96629bc694ef Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 26 Oct 2014 12:33:50 +0400 Subject: Debian 3.9.10 --- qa/qt/qmc_format/GNUmakefile | 27 ++++++++++++++++++++++++++ qa/qt/qmc_format/GNUmakefile.install | 18 ++++++++++++++++++ qa/qt/qmc_format/qmc_format.cpp | 37 ++++++++++++++++++++++++++++++++++++ qa/qt/qmc_format/qmc_format.pro | 13 +++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 qa/qt/qmc_format/GNUmakefile create mode 100644 qa/qt/qmc_format/GNUmakefile.install create mode 100644 qa/qt/qmc_format/qmc_format.cpp create mode 100644 qa/qt/qmc_format/qmc_format.pro (limited to 'qa/qt/qmc_format') diff --git a/qa/qt/qmc_format/GNUmakefile b/qa/qt/qmc_format/GNUmakefile new file mode 100644 index 0000000..2350f48 --- /dev/null +++ b/qa/qt/qmc_format/GNUmakefile @@ -0,0 +1,27 @@ +TOPDIR = ../../.. +include $(TOPDIR)/src/include/builddefs + +COMMAND = qmc_format +PROJECT = $(COMMAND).pro +SOURCES = $(COMMAND).cpp +TESTDIR = $(PCP_VAR_DIR)/testsuite/qt/$(COMMAND) + +LSRCFILES = $(PROJECT) $(SOURCES) +LDIRDIRT = build $(COMMAND).xcodeproj +LDIRT = $(COMMAND) *.o Makefile + +default default_pcp: +ifeq "$(ENABLE_QT)" "true" + $(QTMAKE) + $(LNMAKE) +endif + +install install_pcp: default + $(INSTALL) -m 755 -d $(TESTDIR) + $(INSTALL) -m 644 GNUmakefile.install $(TESTDIR)/GNUmakefile + $(INSTALL) -m 644 $(PROJECT) $(SOURCES) $(TESTDIR) +ifeq "$(ENABLE_QT)" "true" + $(INSTALL) -m 755 $(BINARY) $(TESTDIR)/$(COMMAND) +endif + +include $(BUILDRULES) diff --git a/qa/qt/qmc_format/GNUmakefile.install b/qa/qt/qmc_format/GNUmakefile.install new file mode 100644 index 0000000..1e53804 --- /dev/null +++ b/qa/qt/qmc_format/GNUmakefile.install @@ -0,0 +1,18 @@ +ifdef PCP_CONF +include $(PCP_CONF) +else +include $(PCP_DIR)/etc/pcp.conf +endif +PATH = $(shell . $(PCP_DIR)/etc/pcp.env; echo $$PATH) +include $(PCP_INC_DIR)/builddefs + +COMMAND = qmc_format +PROJECT = $(COMMAND).pro + +default setup install: +ifeq "$(ENABLE_QT)" "true" + $(QTMAKE) + $(LNMAKE) +endif + +include $(BUILDRULES) diff --git a/qa/qt/qmc_format/qmc_format.cpp b/qa/qt/qmc_format/qmc_format.cpp new file mode 100644 index 0000000..1387e31 --- /dev/null +++ b/qa/qt/qmc_format/qmc_format.cpp @@ -0,0 +1,37 @@ +// +// Test QmcMetric::formatValue routines +// + +#include +#include +#include +#include + +QTextStream cerr(stderr); +QTextStream cout(stdout); + +int +main(int argc, char *argv[]) +{ + double d; + char *endptr; + + pmProgname = basename(argv[0]); + if (argc != 2) { + cerr << "Usage: " << pmProgname << " double" << endl; + exit(1); + /*NOTREACHED*/ + } + + d = strtod(argv[1], &endptr); + if (endptr != NULL && endptr[0] != '\0') { + cerr << pmProgname << ": argument \"" << argv[1] + << "\" must be a double (\"" << endptr << "\")" << endl; + exit(1); + /*NOTREACHED*/ + } + + cout << QmcMetric::formatNumber(d) << endl; + + return 0; +} diff --git a/qa/qt/qmc_format/qmc_format.pro b/qa/qt/qmc_format/qmc_format.pro new file mode 100644 index 0000000..5cf4561 --- /dev/null +++ b/qa/qt/qmc_format/qmc_format.pro @@ -0,0 +1,13 @@ +TEMPLATE = app +LANGUAGE = C++ +SOURCES = qmc_format.cpp +CONFIG += qt warn_on +INCLUDEPATH += ../../../src/include +INCLUDEPATH += ../../../src/libpcp_qmc/src +release:DESTDIR = build/debug +debug:DESTDIR = build/release +LIBS += -L../../../src/libpcp/src +LIBS += -L../../../src/libpcp_qmc/src +LIBS += -L../../../src/libpcp_qmc/src/build/Default +LIBS += -lpcp_qmc -lpcp +QT -= gui -- cgit v1.2.3