AM_CPPFLAGS += -I$(top_srcdir)/tests/utils
-LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
+COMMON_TEST_LDADD = \
+ $(top_builddir)/tests/utils/tap/libtap.la \
+ $(top_builddir)/tests/utils/libtestcommon.la
-libtestcommon_la_SOURCES = common.c common.h
-noinst_LTLIBRARIES = libtestcommon.la
-
-COMMON_TEST_LDADD = $(LIBTAP) $(builddir)/libtestcommon.la
-
-test_bitfield_LDADD = $(LIBTAP) $(builddir)/libtestcommon.la
+test_bitfield_LDADD = $(COMMON_TEST_LDADD)
test_ctf_writer_LDADD = \
$(COMMON_TEST_LDADD) \
+++ /dev/null
-/*
- * common.c
- *
- * Lib BabelTrace - Common function to all tests
- *
- * Copyright 2012 - Yannick Brosseau <yannick.brosseau@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <ftw.h>
-
-#define RMDIR_NFDOPEN 8
-
-static
-int nftw_recursive_rmdir(const char *file, const struct stat *sb, int flag,
- struct FTW *s)
-{
- switch (flag) {
- case FTW_F:
- unlink(file);
- break;
- case FTW_DP:
- rmdir(file);
- break;
- }
-
- return 0;
-}
-
-void recursive_rmdir(const char *path)
-{
- int nftw_flags = FTW_PHYS | FTW_DEPTH;
-
- nftw(path, nftw_recursive_rmdir, RMDIR_NFDOPEN, nftw_flags);
-}
+++ /dev/null
-/*
- * common.h
- *
- * Lib BabelTrace - Common function to all tests
- *
- * Copyright 2012 - Yannick Brosseau <yannick.brosseau@gmail.com>
- * Copyright 2016 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef _TESTS_COMMON_H
-#define _TESTS_COMMON_H
-
-struct bt_context;
-
-void recursive_rmdir(const char *path);
-
-#endif /* _TESTS_COMMON_H */
SUBDIRS = tap
+
+noinst_LTLIBRARIES = libtestcommon.la
+libtestcommon_la_SOURCES = common.c common.h
+
# Directories added to EXTRA_DIST will be recursively copied to the distribution.
EXTRA_DIST = python
--- /dev/null
+/*
+ * common.c
+ *
+ * Lib BabelTrace - Common function to all tests
+ *
+ * Copyright 2012 - Yannick Brosseau <yannick.brosseau@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; under version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <dirent.h>
+#include <ftw.h>
+
+#define RMDIR_NFDOPEN 8
+
+static
+int nftw_recursive_rmdir(const char *file, const struct stat *sb, int flag,
+ struct FTW *s)
+{
+ switch (flag) {
+ case FTW_F:
+ unlink(file);
+ break;
+ case FTW_DP:
+ rmdir(file);
+ break;
+ }
+
+ return 0;
+}
+
+void recursive_rmdir(const char *path)
+{
+ int nftw_flags = FTW_PHYS | FTW_DEPTH;
+
+ nftw(path, nftw_recursive_rmdir, RMDIR_NFDOPEN, nftw_flags);
+}
--- /dev/null
+/*
+ * common.h
+ *
+ * Lib BabelTrace - Common function to all tests
+ *
+ * Copyright 2012 - Yannick Brosseau <yannick.brosseau@gmail.com>
+ * Copyright 2016 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; under version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef _TESTS_COMMON_H
+#define _TESTS_COMMON_H
+
+struct bt_context;
+
+void recursive_rmdir(const char *path);
+
+#endif /* _TESTS_COMMON_H */