tests: move input-tty into a test-lib.sh function
[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   README                \
12   check.mk              \
13   envvar-check          \
14   lang-default          \
15   other-fs-tmpdir       \
16   require-perl          \
17   sample-test           \
18   setgid-check          \
19   test-lib.sh           \
20   $(pr_data)
21
22 root_tests =                                    \
23   chown/basic                                   \
24   cp/cp-a-selinux                               \
25   cp/preserve-gid                               \
26   cp/special-bits                               \
27   ls/capability                                 \
28   ls/nameless-uid                               \
29   misc/chcon                                    \
30   misc/selinux                                  \
31   misc/truncate-owned-by-other                  \
32   mkdir/writable-under-readonly                 \
33   mv/sticky-to-xpart                            \
34   rm/fail-2eperm                                \
35   rm/no-give-up                                 \
36   rm/one-file-system                            \
37   tail-2/append-only                            \
38   touch/now-owned-by-other
39
40 .PHONY: check-root
41 check-root:
42         $(MAKE) check TESTS='$(root_tests)'
43
44 check-recursive: root-hint
45
46 # Advertise `check-root' target.
47 .PHONY: root-hint
48 root-hint:
49         @echo '***********************************************************'
50         @echo "NOTICE: Some tests may be run only as root."
51         @echo "  See the 'Running tests as root' section in README."
52         @echo '***********************************************************'
53
54 EXTRA_DIST += $(TESTS)
55
56 # Do not choose a name that is a shell keyword like 'if', or a
57 # commonly-used utility like 'cat' or 'test', as the name of a test.
58 # Otherwise, VPATH builds will fail on hosts like Solaris, since they
59 # will expand 'if test ...' to 'if .../test ...', and the '.../test'
60 # will execute the test script rather than the standard utility.
61
62 # Notes on the ordering of these tests:
63 # Place early in the list tests of the tools that
64 # are most commonly used in test scripts themselves.
65 # E.g., nearly every test script uses rm and chmod.
66 # help-version comes early because it's a basic sanity test.
67 # Put seq early, since lots of other tests use it.
68 # Put tests that sleep early, but not all together, so in parallel builds
69 # they share time with tests that burn CPU, not with others that sleep.
70 # Put head-elide-tail early, because it's long-running.
71
72 TESTS =                                         \
73   misc/help-version                             \
74   misc/invalid-opt                              \
75   rm/cycle                                      \
76   chmod/no-x                                    \
77   chgrp/basic                                   \
78   rm/dangling-symlink                           \
79   misc/ls-time                                  \
80   rm/deep-1                                     \
81   rm/deep-2                                     \
82   rm/dir-no-w                                   \
83   rm/dir-nonrecur                               \
84   rm/dot-rel                                    \
85   rm/isatty                                     \
86   rm/empty-inacc                                \
87   rm/empty-name                                 \
88   rm/f-1                                        \
89   rm/fail-eacces                                \
90   rm/fail-eperm                                 \
91   tail-2/assert                                 \
92   rm/hash                                       \
93   rm/i-1                                        \
94   rm/i-never                                    \
95   rm/i-no-r                                     \
96   tail-2/infloop-1                              \
97   rm/ignorable                                  \
98   rm/inaccessible                               \
99   rm/interactive-always                         \
100   rm/interactive-once                           \
101   rm/ir-1                                       \
102   rm/r-1                                        \
103   rm/r-2                                        \
104   rm/r-3                                        \
105   rm/r-4                                        \
106   rm/readdir-bug                                \
107   rm/rm1                                        \
108   touch/empty-file                              \
109   rm/rm2                                        \
110   rm/rm3                                        \
111   rm/rm4                                        \
112   rm/rm5                                        \
113   rm/sunos-1                                    \
114   rm/unread2                                    \
115   rm/unread3                                    \
116   rm/unreadable                                 \
117   rm/v-slash                                    \
118   chgrp/default-no-deref                        \
119   chgrp/deref                                   \
120   chgrp/no-x                                    \
121   chgrp/posix-H                                 \
122   chgrp/recurse                                 \
123   misc/ptx                                      \
124   misc/test                                     \
125   misc/seq                                      \
126   misc/head                                     \
127   misc/head-elide-tail                          \
128   tail-2/tail-n0f                               \
129   misc/ls-misc                                  \
130   misc/date                                     \
131   misc/ptx-overrun                              \
132   misc/xstrtol                                  \
133   misc/od                                       \
134   misc/mktemp                                   \
135   misc/arch                                     \
136   misc/pr                                       \
137   misc/join                                     \
138   pr/pr-tests                                   \
139   misc/df-P                                     \
140   misc/pwd-unreadable-parent                    \
141   misc/chcon-fail                               \
142   misc/cut                                      \
143   misc/wc                                       \
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/comm                                     \
151   misc/csplit                                   \
152   misc/date-sec                                 \
153   misc/dircolors                                \
154   misc/df                                       \
155   misc/dirname                                  \
156   misc/expand                                   \
157   misc/expr                                     \
158   misc/factor                                   \
159   misc/false-status                             \
160   misc/fmt                                      \
161   misc/fmt-long-line                            \
162   misc/fold                                     \
163   misc/groups-dash                              \
164   misc/groups-version                           \
165   misc/head-c                                   \
166   misc/head-pos                                 \
167   misc/id-context                               \
168   misc/md5sum                                   \
169   misc/md5sum-newline                           \
170   misc/mknod                                    \
171   misc/nice                                     \
172   misc/nl                                       \
173   misc/nohup                                    \
174   misc/od-N                                     \
175   misc/od-multiple-t                            \
176   misc/od-x8                                    \
177   misc/paste                                    \
178   misc/pathchk1                                 \
179   misc/printf                                   \
180   misc/printf-cov                               \
181   misc/printf-hex                               \
182   misc/printf-surprise                          \
183   misc/pwd-long                                 \
184   misc/readlink-fp-loop                         \
185   misc/runcon-no-reorder                        \
186   misc/sha1sum                                  \
187   misc/sha1sum-vec                              \
188   misc/sha224sum                                \
189   misc/sha256sum                                \
190   misc/sha384sum                                \
191   misc/sha512sum                                \
192   misc/shred-exact                              \
193   misc/shred-remove                             \
194   misc/shuf                                     \
195   misc/sort                                     \
196   misc/sort-compress                            \
197   misc/sort-files0-from                         \
198   misc/sort-merge                               \
199   misc/sort-rand                                \
200   misc/sort-version                             \
201   misc/split-a                                  \
202   misc/split-fail                               \
203   misc/split-l                                  \
204   misc/stat-fmt                                 \
205   misc/stat-printf                              \
206   misc/stty                                     \
207   misc/stty-invalid                             \
208   misc/stty-row-col                             \
209   misc/sum                                      \
210   misc/sum-sysv                                 \
211   misc/tac                                      \
212   misc/tac-continue                             \
213   misc/tail                                     \
214   misc/tee                                      \
215   misc/tee-dash                                 \
216   misc/test-diag                                \
217   misc/timeout                                  \
218   misc/timeout-parameters                       \
219   misc/tr                                       \
220   misc/truncate-dangling-symlink                \
221   misc/truncate-dir-fail                        \
222   misc/truncate-fail-diag                       \
223   misc/truncate-fifo                            \
224   misc/truncate-no-create-missing               \
225   misc/truncate-overflow                        \
226   misc/truncate-parameters                      \
227   misc/truncate-relative                        \
228   misc/tsort                                    \
229   misc/tty-eof                                  \
230   misc/unexpand                                 \
231   misc/uniq                                     \
232   chmod/c-option                                \
233   chmod/equal-x                                 \
234   chmod/equals                                  \
235   chmod/inaccessible                            \
236   chmod/octal                                   \
237   chmod/setgid                                  \
238   chmod/thru-dangling                           \
239   chmod/umask-x                                 \
240   chmod/usage                                   \
241   chown/deref                                   \
242   chown/preserve-root                           \
243   chown/separator                               \
244   cp/abuse                                      \
245   cp/acl                                        \
246   cp/backup-1                                   \
247   cp/backup-dir                                 \
248   cp/backup-is-src                              \
249   cp/cp-HL                                      \
250   cp/cp-deref                                   \
251   cp/cp-i                                       \
252   cp/cp-mv-backup                               \
253   cp/cp-parents                                 \
254   cp/deref-slink                                \
255   cp/dir-rm-dest                                \
256   cp/dir-slash                                  \
257   cp/dir-vs-file                                \
258   cp/existing-perm-race                         \
259   cp/fail-perm                                  \
260   cp/file-perm-race                             \
261   cp/into-self                                  \
262   cp/link                                       \
263   cp/link-no-deref                              \
264   cp/link-preserve                              \
265   cp/no-deref-link1                             \
266   cp/no-deref-link2                             \
267   cp/no-deref-link3                             \
268   cp/parent-perm                                \
269   cp/parent-perm-race                           \
270   cp/perm                                       \
271   cp/preserve-2                                 \
272   cp/proc-zero-len                              \
273   cp/r-vs-symlink                               \
274   cp/same-file                                  \
275   cp/slink-2-slink                              \
276   cp/sparse                                     \
277   cp/special-f                                  \
278   cp/src-base-dot                               \
279   cp/symlink-slash                              \
280   cp/thru-dangling                              \
281   dd/misc                                       \
282   dd/not-rewound                                \
283   dd/skip-seek                                  \
284   dd/skip-seek2                                 \
285   dd/unblock-sync                               \
286   df/total                                      \
287   df/total-awk                                  \
288   du/2g                                         \
289   du/8gb                                        \
290   du/basic                                      \
291   du/deref                                      \
292   du/deref-args                                 \
293   du/exclude                                    \
294   du/fd-leak                                    \
295   du/files0-from                                \
296   du/hard-link                                  \
297   du/inacc-dest                                 \
298   du/inacc-dir                                  \
299   du/inaccessible-cwd                           \
300   du/long-from-unreadable                       \
301   du/long-sloop                                 \
302   du/no-deref                                   \
303   du/no-x                                       \
304   du/one-file-system                            \
305   du/restore-wd                                 \
306   du/slash                                      \
307   du/slink                                      \
308   du/trailing-slash                             \
309   du/two-args                                   \
310   install/basic-1                               \
311   install/create-leading                        \
312   install/d-slashdot                            \
313   install/strip-program                         \
314   install/trap                                  \
315   ln/backup-1                                   \
316   ln/hard-backup                                \
317   ln/misc                                       \
318   ln/sf-1                                       \
319   ln/target-1                                   \
320   ls/color-dtype-dir                            \
321   ls/dangle                                     \
322   ls/dired                                      \
323   ls/file-type                                  \
324   ls/follow-slink                               \
325   ls/infloop                                    \
326   ls/inode                                      \
327   ls/m-option                                   \
328   ls/no-arg                                     \
329   ls/proc-selinux-segfault                      \
330   ls/recursive                                  \
331   ls/rt-1                                       \
332   ls/stat-dtype                                 \
333   ls/stat-failed                                \
334   ls/stat-free-symlinks                         \
335   ls/stat-vs-dirent                             \
336   ls/symlink-slash                              \
337   ls/x-option                                   \
338   mkdir/p-1                                     \
339   mkdir/p-2                                     \
340   mkdir/p-3                                     \
341   mkdir/p-slashdot                              \
342   mkdir/p-thru-slink                            \
343   mkdir/p-v                                     \
344   mkdir/parents                                 \
345   mkdir/perm                                    \
346   mkdir/selinux                                 \
347   mkdir/special-1                               \
348   mkdir/t-slash                                 \
349   mv/acl                                        \
350   mv/atomic                                     \
351   mv/atomic2                                    \
352   mv/backup-dir                                 \
353   mv/backup-is-src                              \
354   mv/childproof                                 \
355   mv/diag                                       \
356   mv/dir-file                                   \
357   mv/dir2dir                                    \
358   mv/dup-source                                 \
359   mv/force                                      \
360   mv/hard-2                                     \
361   mv/hard-3                                     \
362   mv/hard-4                                     \
363   mv/hard-link-1                                \
364   mv/hard-verbose                               \
365   mv/i-1                                        \
366   mv/i-2                                        \
367   mv/i-3                                        \
368   mv/i-4                                        \
369   mv/i-5                                        \
370   mv/i-link-no                                  \
371   mv/into-self                                  \
372   mv/into-self-2                                \
373   mv/into-self-3                                \
374   mv/into-self-4                                \
375   mv/leak-fd                                    \
376   mv/mv-special-1                               \
377   mv/no-target-dir                              \
378   mv/part-fail                                  \
379   mv/part-hardlink                              \
380   mv/part-rename                                \
381   mv/part-symlink                               \
382   mv/partition-perm                             \
383   mv/perm-1                                     \
384   mv/reply-no                                   \
385   mv/to-symlink                                 \
386   mv/trailing-slash                             \
387   mv/update                                     \
388   readlink/can-e                                \
389   readlink/can-f                                \
390   readlink/can-m                                \
391   readlink/rl-1                                 \
392   rmdir/fail-perm                               \
393   rmdir/ignore                                  \
394   rmdir/t-slash                                 \
395   tail-2/assert-2                               \
396   tail-2/big-4gb                                \
397   tail-2/proc-ksyms                             \
398   tail-2/start-middle                           \
399   touch/dangling-symlink                        \
400   touch/dir-1                                   \
401   touch/fail-diag                               \
402   touch/fifo                                    \
403   touch/no-create-missing                       \
404   touch/no-rights                               \
405   touch/not-owner                               \
406   touch/obsolescent                             \
407   touch/read-only                               \
408   touch/relative                                \
409   $(root_tests)
410
411 pr_data =                                       \
412   pr/0F                                         \
413   pr/0FF                                        \
414   pr/0FFnt                                      \
415   pr/0FFt                                       \
416   pr/0FnFnt                                     \
417   pr/0FnFt                                      \
418   pr/0Fnt                                       \
419   pr/0Ft                                        \
420   pr/2-S_f-t_notab                              \
421   pr/2-Sf-t_notab                               \
422   pr/2f-t_notab                                 \
423   pr/2s_f-t_notab                               \
424   pr/2s_w60f-t_nota                             \
425   pr/2sf-t_notab                                \
426   pr/2sw60f-t_notab                             \
427   pr/2w60f-t_notab                              \
428   pr/3-0F                                       \
429   pr/3-5l24f-t                                  \
430   pr/3-FF                                       \
431   pr/3a2l17-FF                                  \
432   pr/3a3f-0F                                    \
433   pr/3a3l15-t                                   \
434   pr/3a3l15f-t                                  \
435   pr/3b2l17-FF                                  \
436   pr/3b3f-0F                                    \
437   pr/3b3f-0FF                                   \
438   pr/3b3f-FF                                    \
439   pr/3b3l15-t                                   \
440   pr/3b3l15f-t                                  \
441   pr/3f-0F                                      \
442   pr/3f-FF                                      \
443   pr/3l24-t                                     \
444   pr/3l24f-t                                    \
445   pr/3ml24-FF                                   \
446   pr/3ml24-t                                    \
447   pr/3ml24-t-FF                                 \
448   pr/3ml24f-t                                   \
449   pr/4-7l24-FF                                  \
450   pr/4l24-FF                                    \
451   pr/FF                                         \
452   pr/FFn                                        \
453   pr/FFtn                                       \
454   pr/FnFn                                       \
455   pr/Ja3l24f-lm                                 \
456   pr/Jb3l24f-lm                                 \
457   pr/Jml24f-lm-lo                               \
458   pr/W-72l24f-ll                                \
459   pr/W20l24f-ll                                 \
460   pr/W26l24f-ll                                 \
461   pr/W27l24f-ll                                 \
462   pr/W28l24f-ll                                 \
463   pr/W35Ja3l24f-lm                              \
464   pr/W35Jb3l24f-lm                              \
465   pr/W35Jml24f-lmlo                             \
466   pr/W35a3l24f-lm                               \
467   pr/W35b3l24f-lm                               \
468   pr/W35ml24f-lm-lo                             \
469   pr/W72Jl24f-ll                                \
470   pr/a2l15-FF                                   \
471   pr/a2l17-FF                                   \
472   pr/a3-0F                                      \
473   pr/a3f-0F                                     \
474   pr/a3f-0FF                                    \
475   pr/a3f-FF                                     \
476   pr/a3l15-t                                    \
477   pr/a3l15f-t                                   \
478   pr/a3l24f-lm                                  \
479   pr/b2l15-FF                                   \
480   pr/b2l17-FF                                   \
481   pr/b3-0F                                      \
482   pr/b3f-0F                                     \
483   pr/b3f-0FF                                    \
484   pr/b3f-FF                                     \
485   pr/b3l15-t                                    \
486   pr/b3l15f-t                                   \
487   pr/b3l24f-lm                                  \
488   pr/l24-FF                                     \
489   pr/l24-t                                      \
490   pr/l24f-t                                     \
491   pr/loli                                       \
492   pr/ml20-FF-t                                  \
493   pr/ml24-FF                                    \
494   pr/ml24-t                                     \
495   pr/ml24-t-FF                                  \
496   pr/ml24f-0F                                   \
497   pr/ml24f-lm-lo                                \
498   pr/ml24f-t                                    \
499   pr/ml24f-t-0F                                 \
500   pr/n+2-5l24f-0FF                              \
501   pr/n+2l24f-0FF                                \
502   pr/n+2l24f-bl                                 \
503   pr/n+3-7l24-FF                                \
504   pr/n+3l24f-0FF                                \
505   pr/n+3l24f-bl                                 \
506   pr/n+3ml20f-bl-FF                             \
507   pr/n+3ml24f-bl-tn                             \
508   pr/n+3ml24f-tn-bl                             \
509   pr/n+4-8a2l17-FF                              \
510   pr/n+4b2l17f-0FF                              \
511   pr/n+5-8b3l17f-FF                             \
512   pr/n+5a3l13f-0FF                              \
513   pr/n+6a2l17-FF                                \
514   pr/n+6b3l13f-FF                               \
515   pr/n+7l24-FF                                  \
516   pr/n+8l20-FF                                  \
517   pr/nJml24f-lmlmlo                             \
518   pr/nJml24f-lmlolm                             \
519   pr/nN1+3l24f-bl                               \
520   pr/nN15l24f-bl                                \
521   pr/nSml20-bl-FF                               \
522   pr/nSml20-t-t-FF                              \
523   pr/nSml20-t-tFFFF                             \
524   pr/nSml24-bl-FF                               \
525   pr/nSml24-t-t-FF                              \
526   pr/nSml24-t-tFFFF                             \
527   pr/nl24f-bl                                   \
528   pr/o3Jml24f-lm-lo                             \
529   pr/o3a3Sl24f-tn                               \
530   pr/o3a3Snl24f-tn                              \
531   pr/o3a3l24f-tn                                \
532   pr/o3b3Sl24f-tn                               \
533   pr/o3b3Snl24f-tn                              \
534   pr/o3b3l24f-tn                                \
535   pr/o3mSl24f-bl-tn                             \
536   pr/o3mSnl24fbltn                              \
537   pr/o3ml24f-bl-tn                              \
538   pr/t-0FF                                      \
539   pr/t-FF                                       \
540   pr/t-bl                                       \
541   pr/t-t                                        \
542   pr/tFFn                                       \
543   pr/tFFt                                       \
544   pr/tFFt-bl                                    \
545   pr/tFFt-ll                                    \
546   pr/tFFt-lm                                    \
547   pr/tFnFt                                      \
548   pr/t_notab                                    \
549   pr/t_tab                                      \
550   pr/t_tab_                                     \
551   pr/ta3-0FF                                    \
552   pr/ta3-FF                                     \
553   pr/tb3-0FF                                    \
554   pr/tb3-FF                                     \
555   pr/tn                                         \
556   pr/tn2e5o3-t_tab                              \
557   pr/tn2e8-t_tab                                \
558   pr/tn2e8o3-t_tab                              \
559   pr/tn_2e8-t_tab                               \
560   pr/tn_2e8S-t_tab                              \
561   pr/tne8-t_tab                                 \
562   pr/tne8o3-t_tab                               \
563   pr/tt-0FF                                     \
564   pr/tt-FF                                      \
565   pr/tt-bl                                      \
566   pr/tt-t                                       \
567   pr/tta3-0FF                                   \
568   pr/tta3-FF                                    \
569   pr/ttb3-0FF                                   \
570   pr/ttb3-FF                                    \
571   pr/w72l24f-ll
572
573 AUTOMAKE_OPTIONS =
574 include $(srcdir)/check.mk