-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
122 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: make distcheck | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
distcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch tags so that Autoconf can discover the version. | ||
fetch-depth: 0 | ||
- run: autoreconf -fviW all,error | ||
- run: ./configure | ||
- run: make distcheck | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: distribution-tarball | ||
path: pgpdump-*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/sh | ||
|
||
# The output of this script is intended to follow the Test Anything Protocol (TAP): | ||
# https://testanything.org | ||
|
||
pecho() ( unset IFS; printf %s\\n "$*"; ) | ||
log() { pecho "# $@"; } | ||
bailout() { pecho "Bail out! $@"; exit 1; } | ||
|
||
mydir=${0%/*} | ||
: "${PGPDUMP=${mydir}/../pgpdump}" | ||
[ "$#" -gt 0 ] || set -- "$mydir"/*.res | ||
status=0 | ||
i=0 | ||
|
||
do_test() { | ||
want=$1 | ||
in=${want%.res} | ||
# Command substitution strips all trailing newlines. Echo a character to be stripped later | ||
# so that all trailing newlines are preserved for accurate stdout comparison. | ||
got=$("${PGPDUMP}" -u <${in} && pecho x) || { | ||
log "pgpdump exited with non-zero status $?" | ||
return 1 | ||
} | ||
got=${got%x} | ||
diff=$(printf %s "${got}" | diff -au "${want}" -) | ||
[ -z "${diff}" ] || { | ||
log "unexpected stdout; diff from want to got:" | ||
while IFS= read -r line; do | ||
log "$line" | ||
done <<EOF | ||
$diff | ||
EOF | ||
return 1 | ||
} | ||
} | ||
|
||
pecho "TAP version 14" | ||
pecho "1..$#" | ||
[ -x "${PGPDUMP}" ] || bailout "${PGPDUMP} is not executable" | ||
for want in "$@"; do | ||
i=$((i+1)) | ||
if do_test "${want}"; then | ||
pecho "ok ${i} - ${want}" | ||
else | ||
status=1 | ||
pecho "not ok ${i} - ${want}" | ||
fi | ||
done | ||
|
||
exit "$status" |