Adrian Schröter
e7fbd5920f
Mon Feb 13 15:52:19 GMT 2012 - aspiers@suse.com Add test suite and fix two bugs it found: 1. --subdir was not working 2. --scm bzr was not working FWIW it also works on SLE11 now. I will issue a separate request for my enhancements to tar_scm, since they are much more intrusive (but have about 90% test coverage). OBS-URL: https://build.opensuse.org/request/show/105040 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=32
27 lines
680 B
Bash
27 lines
680 B
Bash
#!/bin/bash
|
|
|
|
# Wrapper around SCM to enable behaviour verification testing
|
|
# on tar_scm's repository caching code. This is cleaner than
|
|
# writing tests which look inside the cache, because then they
|
|
# become coupled to the cache's implementation, and require
|
|
# knowledge of where the cache lives etc.
|
|
|
|
me=`basename $0`
|
|
|
|
if [ -z "$SCM_INVOCATION_LOG" ]; then
|
|
cat <<EOF >&2
|
|
\$SCM_INVOCATION_LOG must be set before calling $0.
|
|
It should be invoked from the test suite, not directly.
|
|
EOF
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$me" = 'scm-wrapper' ]; then
|
|
echo "$me should not be invoked directly, only via symlink" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "$me $*" >> "$SCM_INVOCATION_LOG"
|
|
|
|
/usr/bin/$me "$@"
|