]> git.cworth.org Git - tar/blob - tests/filerem02.at
Imported Upstream version 1.24
[tar] / tests / filerem02.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright (C) 2009 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 # Description: see filerem01.at
20 # This test case checks if the tar exit code is still 2 if a
21 # file or directory disappears that is explicitly mentioned
22 # in the command line.
23
24 AT_SETUP([toplevel file removed (ca. 24 seconds)])
25 AT_KEYWORDS([create incremental filechange filerem filerem02])
26
27 AT_TAR_CHECK([
28 mkdir dir
29 mkdir dir/sub
30 genfile --file dir/file1
31 genfile --file dir/sub/file2
32 mkdir dir2
33 genfile --file dir2/file1
34
35 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
36        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
37        --checkpoint-action='echo' -c -f archive.tar \
38        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
39 ],
40 [2],
41 [ignore],
42 [ignore],[],[],[gnu, posix])
43
44 # Ignore stdout and stderr because their contents depend on
45 # the file system implementation.
46
47 # Timing information: see filerem01.at
48
49 AT_CLEANUP