summaryrefslogtreecommitdiff
path: root/yarns/9000-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-24 18:56:56 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-24 18:56:56 +0000
commite1bc54aebce156815a617a079c03b7689b832066 (patch)
treec262acb249be88406655ff0ded7cd2396c6ad434 /yarns/9000-implements.yarn
parentfbc4ec886a8838cf3188d95e0ea74e104ba99f1b (diff)
downloadobnam-e1bc54aebce156815a617a079c03b7689b832066.tar.gz
Convert --exclude-cache test to yarn
Diffstat (limited to 'yarns/9000-implements.yarn')
-rw-r--r--yarns/9000-implements.yarn28
1 files changed, 28 insertions, 0 deletions
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
index b8733e39..f70ccd07 100644
--- a/yarns/9000-implements.yarn
+++ b/yarns/9000-implements.yarn
@@ -54,6 +54,13 @@ backup programs (regular files with data and no holes).
IMPLEMENTS GIVEN directory (\S+) with interesting filesystem objects
"$SRCDIR/mkfunnyfarm" "$DATADIR/$MATCH_1"
+Some directories will be tagged as cache directories
+(see [Cache directory tagging](http://www.bford.info/cachedir/)).
+
+ IMPLEMENTS GIVEN directory (\S+) is tagged as a cache directory
+ printf 'Signature: 8a477f597d28d172789f06886806bc55' \
+ > "$DATADIR/$MATCH_1/CACHEDIR.TAG"
+
Manifest creation and checking
------------------------------
@@ -82,6 +89,22 @@ We may also need to check two manifests against each other.
IMPLEMENTS THEN manifests (\S+) and (\S+) match
diff -u "$DATADIR/$MATCH_1" "$DATADIR/$MATCH_2"
+In a special case, we may need to update the `Mtime` for the first
+entry in a manifest. This is used, at least, when testing cache
+directory exclusion: we create wanted data, then create a manifest,
+then add the cache directory. This invalidates the Mtime for the first
+entry.
+
+ IMPLEMENTS GIVEN manifest (\S+) has Mtime for the first entry set from (\S+)
+ x=$(date -r "$DATADIR/$MATCH_2" '+Mtime: %Y-%m-%d %H:%M:%S +0000')
+ awk -v "x=$x" '
+ !x && /^Mtime:/ { print x; next }
+ /^$/ { x = 1 }
+ { print }
+ ' "$DATADIR/$MATCH_1" > "$DATADIR/new-manifest"
+ mv "$DATADIR/new-manifest" "$DATADIR/$MATCH_1"
+
+
Obnam configuration management
------------------------------
@@ -107,6 +130,11 @@ someone else.
IMPLEMENTS GIVEN a user (\S+) calling themselves (\S+)
add_to_config "$MATCH_1" client-name "$MATCH_2"
+Add a setting to a client's configuration file.
+
+ IMPLEMENTS GIVEN user (\S+) sets configuration (\S+) to (\S+)
+ add_to_config "$MATCH_1" "$MATCH_2" "$MATCH_3"
+
Backing up
----------