Add LTTngUSTLogger logger plugin test
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 29 Jul 2016 19:08:51 +0000 (15:08 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 9 Aug 2016 14:45:40 +0000 (10:45 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
regression_test/LTTngUSTLogger/Makefile [new file with mode: 0644]
regression_test/LTTngUSTLogger/main1.cfg [new file with mode: 0644]
regression_test/LTTngUSTLogger/main1.ttcn [new file with mode: 0644]
regression_test/LTTngUSTLogger/test_LTTngUSTLogger.sh [new file with mode: 0755]
regression_test/Makefile

diff --git a/regression_test/LTTngUSTLogger/Makefile b/regression_test/LTTngUSTLogger/Makefile
new file mode 100644 (file)
index 0000000..ccb6bc1
--- /dev/null
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2000-2016 Ericsson Telecom AB
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#   Balasko, Jeno
+#   Lovassy, Arpad
+#
+##############################################################################
+TOPDIR := ..
+include $(TOPDIR)/Makefile.regression
+
+.SUFFIXES: .ttcn .hh
+.PHONY: all clean dep run
+
+# Execution mode: (either ttcn3 or ttcn3-parallel)
+TTCN3_LIB = ttcn3$(RT2_SUFFIX)-parallel-dynamic
+
+TTCN3_MODULES = main1.ttcn
+
+GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc)
+GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
+ifdef CODE_SPLIT
+GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc  _seqof.cc _setof.cc _union.cc))
+endif
+
+OBJECTS = $(GENERATED_SOURCES:.cc=.o)
+
+TARGET = main1$(EXESUFFIX)
+
+all: $(TARGET)
+
+$(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES)
+       $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
+
+.ttcn.cc .ttcn.hh:
+       $(TTCN3_COMPILER) $<
+
+clean distclean:
+       -rm -f $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
+       $(GENERATED_SOURCES) *.log Makefile.bak
+
+dep: $(GENERATED_SOURCES)
+       makedepend $(CPPFLAGS) $(GENERATED_SOURCES)
+
+run: $(TARGET)
+       ./test_ctflog.sh
+
+.NOTPARALLEL:
diff --git a/regression_test/LTTngUSTLogger/main1.cfg b/regression_test/LTTngUSTLogger/main1.cfg
new file mode 100644 (file)
index 0000000..00f1a56
--- /dev/null
@@ -0,0 +1,30 @@
+###############################################################################
+# Copyright (c) 2000-2016 Ericsson Telecom AB
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#   Balasko, Jeno
+#   Lovassy, Arpad
+#   Proulx, Philippe
+#
+###############################################################################
+[MODULE_PARAMETERS]
+#N := 10000
+#main1.tsp_N := 10000
+
+[LOGGING]
+LogFile := "logs/%e.%h-%r.%s"
+FileMask := LOG_ALL
+LogSourceInfo := Yes
+SourceInfoFormat := Stack
+AppendFile := No
+
+TimeStampFormat := DateTime
+LogEventTypes := Yes
+LoggerPlugins := { LTTngUSTLogger := "liblttng-ust-logger" }
+
+[EXECUTE]
+main1.control
diff --git a/regression_test/LTTngUSTLogger/main1.ttcn b/regression_test/LTTngUSTLogger/main1.ttcn
new file mode 100644 (file)
index 0000000..820c4bf
--- /dev/null
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * Copyright (c) 2000-2016 Ericsson Telecom AB
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Balasko, Jeno
+ *   Lovassy, Arpad
+ *
+ ******************************************************************************/
+ module main1 {
+
+modulepar integer tsp_N := 1
+type component CT {}
+
+testcase tc_pass(integer pl_i) runs on CT {
+  log("HelloTitan!");
+  setverdict(pass,"Everything is ok, N:", pl_i);
+}
+
+testcase tc_dte() runs on CT {
+  log("HeyTitan!");
+  setverdict(fail,"Everything is nok");
+  var integer a;
+  var integer b:=a;
+}
+
+testcase tc_fail2() runs on CT {
+  log("HeyTitan!");
+  setverdict(fail,"Everything is nok");
+  setverdict(fail,"2. Everything is nok");
+
+}
+
+testcase tc_inc() runs on CT {
+  log("HeyTitan!");
+  setverdict(inconc,"Something is inconsistent");
+}
+
+testcase tc_none() runs on CT {
+  log("HeyTitan!");
+  action("Action");
+}
+
+control{
+  for(var integer i:=0; i<tsp_N; i:=i+1) {
+    execute(tc_pass(i));
+    execute(tc_dte());
+    execute(tc_fail2());
+    execute(tc_inc());
+    execute(tc_none());
+  }
+}
+}
diff --git a/regression_test/LTTngUSTLogger/test_LTTngUSTLogger.sh b/regression_test/LTTngUSTLogger/test_LTTngUSTLogger.sh
new file mode 100755 (executable)
index 0000000..ac1caf7
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2000-2016 Ericsson Telecom AB
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#   Balasko, Jeno
+#   Lovassy, Arpad
+#
+###############################################################################
+
+set -e
+set -o pipefail
+
+ttcn3_start main1 main1.cfg > ttcn3_start_main1.log
index 961fff4deef269a46bd9027b9ac436a7d975f97d..5b2b9a71e380962f2fddb9e24a0c3f2729fd5196 100644 (file)
@@ -45,7 +45,7 @@ nonMandatoryPar logFiles logger_control namedActualParameters \
 assignmentNotation omitdef anytype RAW implicitMsgEncoding pattern_quadruples \
 macros visibility hexstrOper ucharstrOper objidOper CRTR00015758 slider \
 XML ipv6 implicitOmit testcase_defparam transparent HQ16404 cfgFile \
-all_from lazyEval tryCatch text2ttcn json junitlogger ttcn2json profiler templateOmit \
+all_from lazyEval tryCatch text2ttcn json LTTngUSTLogger junitlogger ttcn2json profiler templateOmit \
 customEncoding makefilegen uidChars checkstate hostid
 
 ifdef DYN
This page took 0.027036 seconds and 5 git commands to generate.