<commit_before>#!/usr/bin/env bash
. ./wvtest-bup.sh

set -o pipefail

WVSTART "Testing bup-cron..."

top="$(WVPASS pwd)" || exit $?
tmpdir="$(WVPASS wvmktempdir)" || exit $?

export BUP_DIR="$tmpdir/repo.bup"
export GIT_DIR="$BUP_DIR"

bup() { "$top/bup" "$@"; }
bup-cron() { "$top/contrib/bup-cron" --pidfile "$tmpdir/bup-cron.pid" "$@"; }

WVPASS bup init
WVPASS cd "$tmpdir"

# Can bup-cron be called
WVPASS bup-cron -h >/dev/null

# Create some data to backup
WVSTART "create src data"
WVPASS mkdir -p "$tmpdir/src/"{dir1,dir2}<commit_msg>enable debugging in tests<commit_after>#!/usr/bin/env bash
. ./wvtest-bup.sh

set -o pipefail

WVSTART "Testing bup-cron..."

top="$(WVPASS pwd)" || exit $?
tmpdir="$(WVPASS wvmktempdir)" || exit $?

export BUP_DIR="$tmpdir/repo.bup"
export GIT_DIR="$BUP_DIR"

bup() { "$top/bup" "$@"; }
bup-cron() { "$top/contrib/bup-cron" -D --pidfile "$tmpdir/bup-cron.pid" "$@"; }

WVPASS bup init
WVPASS cd "$tmpdir"

# Can bup-cron be called
WVPASS bup-cron -h >/dev/null

# Create some data to backup
WVSTART "create src data"
WVPASS mkdir -p "$tmpdir/src/"{dir1,dir2}
{'fraction_non_alphanumeric': 0.1985494106980961, 'fraction_numerical': 0.003626473254759746, 'mean_word_length': 4.111111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4075577', 'n_tokens_mistral': 499, 'n_tokens_neox': 484, 'n_words': 107}