785e4386d837700a3058872a747955dc6e012c63
[platform/upstream/coreutils.git] / tests / Makefile.am
1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-.
2
3 # Sort in traditional ASCII order, regardless of the current locale;
4 # otherwise we may get into trouble with distinct strings that the
5 # current locale considers to be equal.
6 ASSORT = LC_ALL=C sort
7
8 EXTRA_DIST =            \
9   Coreutils.pm          \
10   CuTmpdir.pm           \
11   Makefile.am.in        \
12   README                \
13   check.mk              \
14   envvar-check          \
15   group-names           \
16   input-tty             \
17   lang-default          \
18   mk-script             \
19   other-fs-tmpdir       \
20   require-perl          \
21   sample-test           \
22   setgid-check          \
23   sparse-file           \
24   test-lib.sh
25
26 ## N O T E :: Do not add more names to this list.
27 ## N O T E :: Even these are expected to go away.
28 SUBDIRS = cut head join pr sort tac tail test tr uniq wc
29
30 root_tests =                                    \
31   chown/basic                                   \
32   cp/cp-a-selinux                               \
33   cp/preserve-gid                               \
34   cp/special-bits                               \
35   ls/nameless-uid                               \
36   misc/chcon                                    \
37   mkdir/writable-under-readonly                 \
38   mv/sticky-to-xpart                            \
39   rm/fail-2eperm                                \
40   rm/no-give-up                                 \
41   rm/one-file-system                            \
42   tail-2/append-only                            \
43   touch/now-owned-by-other
44
45 .PHONY: check-root
46 check-root:
47         $(MAKE) check TESTS='$(root_tests)' SUBDIRS=
48
49 check-recursive: root-hint
50
51 # Advertise `check-root' target.
52 .PHONY: root-hint
53 root-hint:
54         @echo '***********************************************************'
55         @echo "NOTICE: Some tests may be run only as root."
56         @echo "  See the 'Running tests as root' section in README."
57         @echo '***********************************************************'
58
59 EXTRA_DIST += $(TESTS)
60
61 # Do not choose a name that is a shell keyword like 'if', or a
62 # commonly-used utility like 'cat' or 'test', as the name of a test.
63 # Otherwise, VPATH builds will fail on hosts like Solaris, since they
64 # will expand 'if test ...' to 'if .../test ...', and the '.../test'
65 # will execute the test script rather than the standard utility.
66
67 # Regarding ordering in SUBDIRS, place early in the list the tools that
68 # are most commonly used in test scripts.  Nearly every test script uses
69 # rm and chmod, so they appear early in the list.
70
71 # Notes on the ordering of these tests:
72 # help-version comes early because it's a basic sanity test.
73 # Put seq early, since lots of other tests use it.
74 # Put tests that sleep early, but not all together, so in parallel builds
75 # they share time with tests that burn CPU, not with others that sleep.
76 # Put head-elide-tail early, because it's long-running.
77
78 TESTS =                                         \
79   misc/help-version                             \
80   rm/cycle                                      \
81   chmod/no-x                                    \
82   chgrp/basic                                   \
83   rm/dangling-symlink                           \
84   misc/ls-time                                  \
85   rm/deep-1                                     \
86   rm/deep-2                                     \
87   rm/dir-no-w                                   \
88   rm/dir-nonrecur                               \
89   rm/dot-rel                                    \
90   rm/isatty                                     \
91   rm/empty-inacc                                \
92   rm/empty-name                                 \
93   rm/f-1                                        \
94   rm/fail-eacces                                \
95   rm/fail-eperm                                 \
96   tail-2/assert                                 \
97   rm/hash                                       \
98   rm/i-1                                        \
99   rm/i-never                                    \
100   rm/i-no-r                                     \
101   tail-2/infloop-1                              \
102   rm/ignorable                                  \
103   rm/inaccessible                               \
104   rm/interactive-always                         \
105   rm/interactive-once                           \
106   rm/ir-1                                       \
107   rm/r-1                                        \
108   rm/r-2                                        \
109   rm/r-3                                        \
110   rm/r-4                                        \
111   rm/readdir-bug                                \
112   rm/rm1                                        \
113   touch/empty-file                              \
114   rm/rm2                                        \
115   rm/rm3                                        \
116   rm/rm4                                        \
117   rm/rm5                                        \
118   rm/sunos-1                                    \
119   rm/unread2                                    \
120   rm/unread3                                    \
121   rm/unreadable                                 \
122   rm/v-slash                                    \
123   chgrp/default-no-deref                        \
124   chgrp/deref                                   \
125   chgrp/no-x                                    \
126   chgrp/posix-H                                 \
127   chgrp/recurse                                 \
128   misc/seq                                      \
129   misc/head-elide-tail                          \
130   tail-2/tail-n0f                               \
131   misc/ls-misc                                  \
132   misc/date                                     \
133   misc/ptx-overrun                              \
134   misc/xstrtol                                  \
135   misc/od                                       \
136   misc/mktemp                                   \
137   misc/arch                                     \
138   misc/pr                                       \
139   misc/df-P                                     \
140   misc/pwd-unreadable-parent                    \
141   misc/chcon-fail                               \
142   misc/selinux                                  \
143   misc/cut                                      \
144   misc/wc-files0-from                           \
145   misc/wc-files0                                \
146   misc/cat-proc                                 \
147   misc/base64                                   \
148   misc/basename                                 \
149   misc/close-stdout                             \
150   misc/csplit                                   \
151   misc/date-sec                                 \
152   misc/dircolors                                \
153   misc/df                                       \
154   misc/dirname                                  \
155   misc/expand                                   \
156   misc/expr                                     \
157   misc/factor                                   \
158   misc/false-status                             \
159   misc/fmt                                      \
160   misc/fmt-long-line                            \
161   misc/fold                                     \
162   misc/groups-dash                              \
163   misc/groups-version                           \
164   misc/head-c                                   \
165   misc/head-pos                                 \
166   misc/id-context                               \
167   misc/md5sum                                   \
168   misc/md5sum-newline                           \
169   misc/mknod                                    \
170   misc/nice                                     \
171   misc/nl                                       \
172   misc/nohup                                    \
173   misc/od-N                                     \
174   misc/od-x8                                    \
175   misc/paste                                    \
176   misc/pathchk1                                 \
177   misc/printf                                   \
178   misc/printf-hex                               \
179   misc/printf-surprise                          \
180   misc/pwd-long                                 \
181   misc/readlink-fp-loop                         \
182   misc/runcon-no-reorder                        \
183   misc/sha1sum                                  \
184   misc/sha1sum-vec                              \
185   misc/sha224sum                                \
186   misc/sha256sum                                \
187   misc/sha384sum                                \
188   misc/sha512sum                                \
189   misc/shred-exact                              \
190   misc/shred-remove                             \
191   misc/shuf                                     \
192   misc/sort-compress                            \
193   misc/sort-merge                               \
194   misc/sort-rand                                \
195   misc/split-a                                  \
196   misc/split-fail                               \
197   misc/split-l                                  \
198   misc/stat-fmt                                 \
199   misc/stat-printf                              \
200   misc/stty                                     \
201   misc/stty-invalid                             \
202   misc/stty-row-col                             \
203   misc/sum                                      \
204   misc/sum-sysv                                 \
205   misc/tac-continue                             \
206   misc/tee                                      \
207   misc/tee-dash                                 \
208   misc/test-diag                                \
209   misc/tsort                                    \
210   misc/tty-eof                                  \
211   misc/unexpand                                 \
212   chmod/c-option                                \
213   chmod/equal-x                                 \
214   chmod/equals                                  \
215   chmod/inaccessible                            \
216   chmod/octal                                   \
217   chmod/setgid                                  \
218   chmod/thru-dangling                           \
219   chmod/umask-x                                 \
220   chmod/usage                                   \
221   chown/deref                                   \
222   chown/preserve-root                           \
223   chown/separator                               \
224   cp/abuse                                      \
225   cp/acl                                        \
226   cp/backup-1                                   \
227   cp/backup-dir                                 \
228   cp/backup-is-src                              \
229   cp/cp-HL                                      \
230   cp/cp-deref                                   \
231   cp/cp-i                                       \
232   cp/cp-mv-backup                               \
233   cp/cp-parents                                 \
234   cp/deref-slink                                \
235   cp/dir-rm-dest                                \
236   cp/dir-slash                                  \
237   cp/dir-vs-file                                \
238   cp/existing-perm-race                         \
239   cp/fail-perm                                  \
240   cp/file-perm-race                             \
241   cp/into-self                                  \
242   cp/link                                       \
243   cp/link-no-deref                              \
244   cp/link-preserve                              \
245   cp/no-deref-link1                             \
246   cp/no-deref-link2                             \
247   cp/no-deref-link3                             \
248   cp/parent-perm                                \
249   cp/parent-perm-race                           \
250   cp/perm                                       \
251   cp/preserve-2                                 \
252   cp/proc-zero-len                              \
253   cp/r-vs-symlink                               \
254   cp/same-file                                  \
255   cp/slink-2-slink                              \
256   cp/sparse                                     \
257   cp/special-f                                  \
258   cp/src-base-dot                               \
259   cp/symlink-slash                              \
260   cp/thru-dangling                              \
261   dd/misc                                       \
262   dd/not-rewound                                \
263   dd/skip-seek                                  \
264   dd/skip-seek2                                 \
265   dd/unblock-sync                               \
266   du/2g                                         \
267   du/8gb                                        \
268   du/basic                                      \
269   du/deref                                      \
270   du/deref-args                                 \
271   du/exclude                                    \
272   du/fd-leak                                    \
273   du/files0-from                                \
274   du/hard-link                                  \
275   du/inacc-dest                                 \
276   du/inacc-dir                                  \
277   du/inaccessible-cwd                           \
278   du/long-from-unreadable                       \
279   du/long-sloop                                 \
280   du/no-deref                                   \
281   du/no-x                                       \
282   du/one-file-system                            \
283   du/restore-wd                                 \
284   du/slash                                      \
285   du/slink                                      \
286   du/trailing-slash                             \
287   du/two-args                                   \
288   install/basic-1                               \
289   install/create-leading                        \
290   install/d-slashdot                            \
291   install/trap                                  \
292   ln/backup-1                                   \
293   ln/hard-backup                                \
294   ln/misc                                       \
295   ln/sf-1                                       \
296   ln/target-1                                   \
297   ls/color-dtype-dir                            \
298   ls/dangle                                     \
299   ls/dired                                      \
300   ls/file-type                                  \
301   ls/follow-slink                               \
302   ls/infloop                                    \
303   ls/inode                                      \
304   ls/m-option                                   \
305   ls/no-arg                                     \
306   ls/proc-selinux-segfault                      \
307   ls/recursive                                  \
308   ls/rt-1                                       \
309   ls/stat-dtype                                 \
310   ls/stat-failed                                \
311   ls/stat-free-symlinks                         \
312   ls/stat-vs-dirent                             \
313   ls/symlink-slash                              \
314   ls/x-option                                   \
315   mkdir/p-1                                     \
316   mkdir/p-2                                     \
317   mkdir/p-3                                     \
318   mkdir/p-slashdot                              \
319   mkdir/p-thru-slink                            \
320   mkdir/p-v                                     \
321   mkdir/parents                                 \
322   mkdir/perm                                    \
323   mkdir/selinux                                 \
324   mkdir/special-1                               \
325   mkdir/t-slash                                 \
326   mv/acl                                        \
327   mv/atomic                                     \
328   mv/atomic2                                    \
329   mv/backup-dir                                 \
330   mv/backup-is-src                              \
331   mv/childproof                                 \
332   mv/diag                                       \
333   mv/dir-file                                   \
334   mv/dir2dir                                    \
335   mv/dup-source                                 \
336   mv/force                                      \
337   mv/hard-2                                     \
338   mv/hard-3                                     \
339   mv/hard-4                                     \
340   mv/hard-link-1                                \
341   mv/hard-verbose                               \
342   mv/i-1                                        \
343   mv/i-2                                        \
344   mv/i-3                                        \
345   mv/i-4                                        \
346   mv/i-5                                        \
347   mv/i-link-no                                  \
348   mv/into-self                                  \
349   mv/into-self-2                                \
350   mv/into-self-3                                \
351   mv/into-self-4                                \
352   mv/leak-fd                                    \
353   mv/mv-special-1                               \
354   mv/no-target-dir                              \
355   mv/part-fail                                  \
356   mv/part-hardlink                              \
357   mv/part-rename                                \
358   mv/part-symlink                               \
359   mv/partition-perm                             \
360   mv/perm-1                                     \
361   mv/reply-no                                   \
362   mv/to-symlink                                 \
363   mv/trailing-slash                             \
364   mv/update                                     \
365   readlink/can-e                                \
366   readlink/can-f                                \
367   readlink/can-m                                \
368   readlink/rl-1                                 \
369   rmdir/fail-perm                               \
370   rmdir/ignore                                  \
371   rmdir/t-slash                                 \
372   tail-2/assert-2                               \
373   tail-2/big-4gb                                \
374   tail-2/proc-ksyms                             \
375   tail-2/start-middle                           \
376   touch/dangling-symlink                        \
377   touch/dir-1                                   \
378   touch/fail-diag                               \
379   touch/fifo                                    \
380   touch/no-create-missing                       \
381   touch/no-rights                               \
382   touch/not-owner                               \
383   touch/obsolescent                             \
384   touch/read-only                               \
385   touch/relative                                \
386   $(root_tests)
387
388 include $(top_srcdir)/tests/check.mk