[systemd-commits] Makefile.am po/POTFILES.in src/journal

Lennart Poettering lennart at kemper.freedesktop.org
Fri Jul 13 04:50:55 PDT 2012


 Makefile.am                |    8 +++++++-
 po/POTFILES.in             |    1 +
 src/journal/test-journal.c |    6 +++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 95ea1b90cc61f464f3b9bc147119dee4ba9620b8
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jul 13 13:50:39 2012 +0200

    test: hook up more tests with make check

diff --git a/Makefile.am b/Makefile.am
index e688aae..362c466 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -994,7 +994,8 @@ noinst_PROGRAMS += \
 TESTS += \
 	test-job-type \
 	test-env-replace \
-	test-strv
+	test-strv \
+	test-unit-name
 
 test_engine_SOURCES = \
 	src/test/test-engine.c
@@ -2333,6 +2334,11 @@ noinst_PROGRAMS += \
 	test-journal-match \
 	test-journal-stream
 
+TESTS += \
+	test-journal
+	test-journal-match \
+	test-journal-stream
+
 pkginclude_HEADERS += \
 	src/systemd/sd-journal.h \
 	src/systemd/sd-messages.h
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ed2c308..9fb9715 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,3 +2,4 @@ src/hostname/org.freedesktop.hostname1.policy.in
 src/locale/org.freedesktop.locale1.policy.in
 src/login/org.freedesktop.login1.policy.in
 src/timedate/org.freedesktop.timedate1.policy.in
+src/core/org.freedesktop.systemd1.policy.in
diff --git a/src/journal/test-journal.c b/src/journal/test-journal.c
index 39f4c16..9e1a4f5 100644
--- a/src/journal/test-journal.c
+++ b/src/journal/test-journal.c
@@ -34,10 +34,12 @@ int main(int argc, char *argv[]) {
         static const char test[] = "test", test2[] = "test2";
         Object *o;
         uint64_t p;
+        char t[] = "/tmp/journal-XXXXXX";
 
         log_set_max_level(LOG_DEBUG);
 
-        unlink("test.journal");
+        assert_se(mkdtemp(t));
+        assert_se(chdir(t) >= 0);
 
         assert_se(journal_file_open("test.journal", O_RDWR|O_CREAT, 0666, NULL, &f) == 0);
 
@@ -116,5 +118,7 @@ int main(int argc, char *argv[]) {
 
         log_error("Exiting...");
 
+        assert_se(rm_rf(t, false, true, false) >= 0);
+
         return 0;
 }



More information about the systemd-commits mailing list