test-path: move all related test files to a specific directory
authorRonny Chevalier <chevalier.ronny@gmail.com>
Fri, 30 Oct 2015 17:12:31 +0000 (18:12 +0100)
committerRonny Chevalier <chevalier.ronny@gmail.com>
Sat, 31 Oct 2015 14:07:19 +0000 (15:07 +0100)
To avoid polluting test/

36 files changed:
Makefile.am
src/test/test-path.c
test/path-changed.path [deleted file]
test/path-changed.service [deleted symlink]
test/path-directorynotempty.path [deleted file]
test/path-directorynotempty.service [deleted symlink]
test/path-exists.path [deleted file]
test/path-exists.service [deleted symlink]
test/path-existsglob.path [deleted file]
test/path-existsglob.service [deleted symlink]
test/path-makedirectory.path [deleted file]
test/path-makedirectory.service [deleted symlink]
test/path-modified.path [deleted file]
test/path-modified.service [deleted symlink]
test/path-mycustomunit.service [deleted file]
test/path-service.service [deleted file]
test/path-unit.path [deleted file]
test/paths.target [deleted symlink]
test/test-path/basic.target [new symlink]
test/test-path/path-changed.path [new file with mode: 0644]
test/test-path/path-changed.service [new symlink]
test/test-path/path-directorynotempty.path [new file with mode: 0644]
test/test-path/path-directorynotempty.service [new symlink]
test/test-path/path-exists.path [new file with mode: 0644]
test/test-path/path-exists.service [new symlink]
test/test-path/path-existsglob.path [new file with mode: 0644]
test/test-path/path-existsglob.service [new symlink]
test/test-path/path-makedirectory.path [new file with mode: 0644]
test/test-path/path-makedirectory.service [new symlink]
test/test-path/path-modified.path [new file with mode: 0644]
test/test-path/path-modified.service [new symlink]
test/test-path/path-mycustomunit.service [new file with mode: 0644]
test/test-path/path-service.service [new file with mode: 0644]
test/test-path/path-unit.path [new file with mode: 0644]
test/test-path/paths.target [new symlink]
test/test-path/sysinit.target [new symlink]

index 4319c2fdb7a504d067dd3daa648e0a2466d75ebd..be001bd09ec1928afd5989baa9a396f6f414a45e 100644 (file)
@@ -1515,7 +1515,6 @@ EXTRA_DIST += \
        test/h.service \
        test/parent-deep.slice \
        test/parent.slice \
-       test/paths.target \
        test/sched_idle_bad.service \
        test/sched_idle_ok.service \
        test/sched_rr_bad.service \
@@ -1529,21 +1528,24 @@ EXTRA_DIST += \
        test/testsuite.target \
        test/timers.target \
        test/unstoppable.service \
-       test/path-changed.service \
-       test/path-directorynotempty.service \
-       test/path-existsglob.service \
-       test/path-exists.service \
-       test/path-makedirectory.service \
-       test/path-modified.service \
-       test/path-mycustomunit.service \
-       test/path-service.service \
-       test/path-changed.path \
-       test/path-directorynotempty.path \
-       test/path-existsglob.path \
-       test/path-exists.path \
-       test/path-makedirectory.path \
-       test/path-modified.path \
-       test/path-unit.path \
+       test/test-path/paths.target \
+       test/test-path/basic.target \
+       test/test-path/sysinit.target \
+       test/test-path/path-changed.service \
+       test/test-path/path-directorynotempty.service \
+       test/test-path/path-existsglob.service \
+       test/test-path/path-exists.service \
+       test/test-path/path-makedirectory.service \
+       test/test-path/path-modified.service \
+       test/test-path/path-mycustomunit.service \
+       test/test-path/path-service.service \
+       test/test-path/path-changed.path \
+       test/test-path/path-directorynotempty.path \
+       test/test-path/path-existsglob.path \
+       test/test-path/path-exists.path \
+       test/test-path/path-makedirectory.path \
+       test/test-path/path-modified.path \
+       test/test-path/path-unit.path \
        test/test-execute/exec-environment-empty.service \
        test/test-execute/exec-environment-multiple.service \
        test/test-execute/exec-environment.service \
index ff0f044958b29ed12369999f38b21c0e170fa40f..8302bdd28302a0f0e4525fe933d73f15e5a1afeb 100644 (file)
@@ -258,7 +258,7 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
-        assert_se(set_unit_path(TEST_DIR) >= 0);
+        assert_se(set_unit_path(TEST_DIR "/test-path/") >= 0);
 
         for (test = tests; test && *test; test++) {
                 int r;
diff --git a/test/path-changed.path b/test/path-changed.path
deleted file mode 100644 (file)
index e58bdd9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Test PathChanged
-
-[Path]
-PathChanged=/tmp/test-path_changed
-
-[Install]
-WantedBy=multi-user.target
diff --git a/test/path-changed.service b/test/path-changed.service
deleted file mode 120000 (symlink)
index 8bdf178..0000000
+++ /dev/null
@@ -1 +0,0 @@
-path-service.service
\ No newline at end of file
diff --git a/test/path-directorynotempty.path b/test/path-directorynotempty.path
deleted file mode 100644 (file)
index 17e599f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Test DirectoryNotEmpty
-
-[Path]
-DirectoryNotEmpty=/tmp/test-path_directorynotempty/
-
-[Install]
-WantedBy=multi-user.target
diff --git a/test/path-directorynotempty.service b/test/path-directorynotempty.service
deleted file mode 120000 (symlink)
index 8bdf178..0000000
+++ /dev/null
@@ -1 +0,0 @@
-path-service.service
\ No newline at end of file
diff --git a/test/path-exists.path b/test/path-exists.path
deleted file mode 100644 (file)
index c4c9105..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Test PathExists
-
-[Path]
-PathExists=/tmp/test-path_exists
-
-[Install]
-WantedBy=multi-user.target
diff --git a/test/path-exists.service b/test/path-exists.service
deleted file mode 120000 (symlink)
index 8bdf178..0000000
+++ /dev/null
@@ -1 +0,0 @@
-path-service.service
\ No newline at end of file
diff --git a/test/path-existsglob.path b/test/path-existsglob.path
deleted file mode 100644 (file)
index a058599..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Test PathExistsGlob
-
-[Path]
-PathExistsGlob=/tmp/test-path_existsglob*
-
-[Install]
-WantedBy=multi-user.target
diff --git a/test/path-existsglob.service b/test/path-existsglob.service
deleted file mode 120000 (symlink)
index 8bdf178..0000000
+++ /dev/null
@@ -1 +0,0 @@
-path-service.service
\ No newline at end of file
diff --git a/test/path-makedirectory.path b/test/path-makedirectory.path
deleted file mode 100644 (file)
index 9408479..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Test MakeDirectory & DirectoryMode
-
-[Path]
-DirectoryNotEmpty=/tmp/test-path_makedirectory/
-MakeDirectory=yes
-DirectoryMode=0744
-
-[Install]
-WantedBy=multi-user.target
diff --git a/test/path-makedirectory.service b/test/path-makedirectory.service
deleted file mode 120000 (symlink)
index 8bdf178..0000000
+++ /dev/null
@@ -1 +0,0 @@
-path-service.service
\ No newline at end of file
diff --git a/test/path-modified.path b/test/path-modified.path
deleted file mode 100644 (file)
index 1836322..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Test PathModified
-
-[Path]
-PathModified=/tmp/test-path_modified
-
-[Install]
-WantedBy=multi-user.target
diff --git a/test/path-modified.service b/test/path-modified.service
deleted file mode 120000 (symlink)
index 8bdf178..0000000
+++ /dev/null
@@ -1 +0,0 @@
-path-service.service
\ No newline at end of file
diff --git a/test/path-mycustomunit.service b/test/path-mycustomunit.service
deleted file mode 100644 (file)
index 172ac0d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Service Test Path Unit=
-
-[Service]
-ExecStart=/bin/true
-Type=oneshot
diff --git a/test/path-service.service b/test/path-service.service
deleted file mode 100644 (file)
index f8499ec..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Service Test for Path units
-
-[Service]
-ExecStart=/bin/true
-Type=oneshot
diff --git a/test/path-unit.path b/test/path-unit.path
deleted file mode 100644 (file)
index 95e572d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Test Path Unit=
-
-[Path]
-PathExists=/tmp/test-path_unit
-Unit=path-mycustomunit.service
-
-[Install]
-WantedBy=multi-user.target
diff --git a/test/paths.target b/test/paths.target
deleted file mode 120000 (symlink)
index e9939c9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../units/paths.target
\ No newline at end of file
diff --git a/test/test-path/basic.target b/test/test-path/basic.target
new file mode 120000 (symlink)
index 0000000..a882b72
--- /dev/null
@@ -0,0 +1 @@
+../../units/basic.target
\ No newline at end of file
diff --git a/test/test-path/path-changed.path b/test/test-path/path-changed.path
new file mode 100644 (file)
index 0000000..e58bdd9
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathChanged
+
+[Path]
+PathChanged=/tmp/test-path_changed
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/test-path/path-changed.service b/test/test-path/path-changed.service
new file mode 120000 (symlink)
index 0000000..8bdf178
--- /dev/null
@@ -0,0 +1 @@
+path-service.service
\ No newline at end of file
diff --git a/test/test-path/path-directorynotempty.path b/test/test-path/path-directorynotempty.path
new file mode 100644 (file)
index 0000000..17e599f
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test DirectoryNotEmpty
+
+[Path]
+DirectoryNotEmpty=/tmp/test-path_directorynotempty/
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/test-path/path-directorynotempty.service b/test/test-path/path-directorynotempty.service
new file mode 120000 (symlink)
index 0000000..8bdf178
--- /dev/null
@@ -0,0 +1 @@
+path-service.service
\ No newline at end of file
diff --git a/test/test-path/path-exists.path b/test/test-path/path-exists.path
new file mode 100644 (file)
index 0000000..c4c9105
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathExists
+
+[Path]
+PathExists=/tmp/test-path_exists
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/test-path/path-exists.service b/test/test-path/path-exists.service
new file mode 120000 (symlink)
index 0000000..8bdf178
--- /dev/null
@@ -0,0 +1 @@
+path-service.service
\ No newline at end of file
diff --git a/test/test-path/path-existsglob.path b/test/test-path/path-existsglob.path
new file mode 100644 (file)
index 0000000..a058599
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathExistsGlob
+
+[Path]
+PathExistsGlob=/tmp/test-path_existsglob*
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/test-path/path-existsglob.service b/test/test-path/path-existsglob.service
new file mode 120000 (symlink)
index 0000000..8bdf178
--- /dev/null
@@ -0,0 +1 @@
+path-service.service
\ No newline at end of file
diff --git a/test/test-path/path-makedirectory.path b/test/test-path/path-makedirectory.path
new file mode 100644 (file)
index 0000000..9408479
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Test MakeDirectory & DirectoryMode
+
+[Path]
+DirectoryNotEmpty=/tmp/test-path_makedirectory/
+MakeDirectory=yes
+DirectoryMode=0744
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/test-path/path-makedirectory.service b/test/test-path/path-makedirectory.service
new file mode 120000 (symlink)
index 0000000..8bdf178
--- /dev/null
@@ -0,0 +1 @@
+path-service.service
\ No newline at end of file
diff --git a/test/test-path/path-modified.path b/test/test-path/path-modified.path
new file mode 100644 (file)
index 0000000..1836322
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathModified
+
+[Path]
+PathModified=/tmp/test-path_modified
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/test-path/path-modified.service b/test/test-path/path-modified.service
new file mode 120000 (symlink)
index 0000000..8bdf178
--- /dev/null
@@ -0,0 +1 @@
+path-service.service
\ No newline at end of file
diff --git a/test/test-path/path-mycustomunit.service b/test/test-path/path-mycustomunit.service
new file mode 100644 (file)
index 0000000..172ac0d
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Service Test Path Unit=
+
+[Service]
+ExecStart=/bin/true
+Type=oneshot
diff --git a/test/test-path/path-service.service b/test/test-path/path-service.service
new file mode 100644 (file)
index 0000000..f8499ec
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Service Test for Path units
+
+[Service]
+ExecStart=/bin/true
+Type=oneshot
diff --git a/test/test-path/path-unit.path b/test/test-path/path-unit.path
new file mode 100644 (file)
index 0000000..95e572d
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Test Path Unit=
+
+[Path]
+PathExists=/tmp/test-path_unit
+Unit=path-mycustomunit.service
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/test-path/paths.target b/test/test-path/paths.target
new file mode 120000 (symlink)
index 0000000..b402796
--- /dev/null
@@ -0,0 +1 @@
+../../units/paths.target
\ No newline at end of file
diff --git a/test/test-path/sysinit.target b/test/test-path/sysinit.target
new file mode 120000 (symlink)
index 0000000..9d10e5b
--- /dev/null
@@ -0,0 +1 @@
+../../units/sysinit.target
\ No newline at end of file