From 6dd969b5dd702909b8eb827e850c851053774055 Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Mon, 15 Jun 2009 13:03:25 -0400 Subject: [PATCH] reorganize test programs into tests/ directory --- Makefile.am | 2 +- configure.ac | 4 +++- {hello => tests/hello}/Makefile.am | 0 {hello => tests/hello}/README | 0 {hello => tests/hello}/hello.c | 0 {hello => tests/hello}/run | 0 {hello => tests/hello}/tp.c | 0 {hello => tests/hello}/tp.h | 0 tests/hello2/Makefile.am | 9 +++++++++ tests/hello2/README | 1 + tests/hello2/hello2.c | 21 +++++++++++++++++++++ tests/hello2/run | 3 +++ 12 files changed, 38 insertions(+), 2 deletions(-) rename {hello => tests/hello}/Makefile.am (100%) rename {hello => tests/hello}/README (100%) rename {hello => tests/hello}/hello.c (100%) rename {hello => tests/hello}/run (100%) rename {hello => tests/hello}/tp.c (100%) rename {hello => tests/hello}/tp.h (100%) create mode 100644 tests/hello2/Makefile.am create mode 100644 tests/hello2/README create mode 100644 tests/hello2/hello2.c create mode 100755 tests/hello2/run diff --git a/Makefile.am b/Makefile.am index 99326af..1f9ba75 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = libust hello libmallocwrap ustd ust +SUBDIRS = libust tests libmallocwrap ustd ust EXTRA_DIST = share/kernelcompat.h doc diff --git a/configure.ac b/configure.ac index dce1239..21e00b5 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,9 @@ AC_SUBST(KCOMPAT_LIBS) AC_CONFIG_FILES([ Makefile libust/Makefile - hello/Makefile + tests/Makefile + tests/hello/Makefile + tests/hello2/Makefile libmallocwrap/Makefile ustd/Makefile ust/Makefile diff --git a/hello/Makefile.am b/tests/hello/Makefile.am similarity index 100% rename from hello/Makefile.am rename to tests/hello/Makefile.am diff --git a/hello/README b/tests/hello/README similarity index 100% rename from hello/README rename to tests/hello/README diff --git a/hello/hello.c b/tests/hello/hello.c similarity index 100% rename from hello/hello.c rename to tests/hello/hello.c diff --git a/hello/run b/tests/hello/run similarity index 100% rename from hello/run rename to tests/hello/run diff --git a/hello/tp.c b/tests/hello/tp.c similarity index 100% rename from hello/tp.c rename to tests/hello/tp.c diff --git a/hello/tp.h b/tests/hello/tp.h similarity index 100% rename from hello/tp.h rename to tests/hello/tp.h diff --git a/tests/hello2/Makefile.am b/tests/hello2/Makefile.am new file mode 100644 index 0000000..1abdae0 --- /dev/null +++ b/tests/hello2/Makefile.am @@ -0,0 +1,9 @@ +INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \ + $(KCOMPAT_CFLAGS) $(URCU_CFLAGS) + +noinst_PROGRAMS = hello2 +hello2_SOURCES = hello2.c +hello2_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS) + +noinst_SCRIPTS = run +EXTRA_DIST = run diff --git a/tests/hello2/README b/tests/hello2/README new file mode 100644 index 0000000..68b11e6 --- /dev/null +++ b/tests/hello2/README @@ -0,0 +1 @@ +This is a hello world application used to test the LTTng userspace tracer. diff --git a/tests/hello2/hello2.c b/tests/hello2/hello2.c new file mode 100644 index 0000000..f9bebce --- /dev/null +++ b/tests/hello2/hello2.c @@ -0,0 +1,21 @@ +#include +#include +#include "marker.h" +int main() +{ + int result; + int i; + +// sleep(1); + + printf("Hello, World!\n"); + + for(i=0; i<500; i++) { + trace_mark(ust, bar, "str %d", i); + trace_mark(ust, bar2, "number1 %d number2 %d", (int)53, (int)9800); + usleep(20); + } + + return 0; +} +MARKER_LIB; diff --git a/tests/hello2/run b/tests/hello2/run new file mode 100755 index 0000000..6f5f5ba --- /dev/null +++ b/tests/hello2/run @@ -0,0 +1,3 @@ +#!/bin/sh + +UST_AUTOPROBE=1 UST_TRACE=1 LD_LIBRARY_PATH=../libust/.libs:../../liburcu $1 .libs/hello2 -- 2.34.1