mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-11-19 03:25:33 +00:00
Share implementation with github workflow
Signed-off-by: Stefano Rivera <stefano@rivera.za.net>
This commit is contained in:
parent
26e3f8c52e
commit
24f09bd016
16
.github/workflows/test.yml
vendored
16
.github/workflows/test.yml
vendored
@ -24,21 +24,11 @@ jobs:
|
||||
printf '#!/bin/sh\n\nexec python "$@"\n' >python3 &&
|
||||
|
||||
export PATH=$PWD:$PATH &&
|
||||
export PYTHONPATH=$PWD &&
|
||||
export TEST_SHELL_PATH=/bin/sh &&
|
||||
|
||||
failed=0 &&
|
||||
cd t &&
|
||||
for t in t[0-9]*.sh
|
||||
do
|
||||
printf '\n\n== %s ==\n' "$t" &&
|
||||
bash $t -q -v -x ||
|
||||
failed=$(($failed+1))
|
||||
done &&
|
||||
if test 0 != $failed
|
||||
if ! t/run_tests -q -v -x
|
||||
then
|
||||
mkdir ../failed &&
|
||||
tar czf ../failed/failed.tar.gz .
|
||||
mkdir failed &&
|
||||
tar czf failed/failed.tar.gz t
|
||||
exit 1
|
||||
fi
|
||||
- name: upload failed tests' directories
|
||||
|
17
t/run_tests
17
t/run_tests
@ -3,14 +3,25 @@ set -eu
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
# Put git_filter_repo.py on the front of PYTHONPATH
|
||||
export PYTHONPATH="$PWD/..${PYTHONPATH:+:$PYTHONPATH}"
|
||||
|
||||
# We pretend filenames are unicode for two reasons: (1) because it exercises
|
||||
# more code, and (2) this setting will detect accidental use of unicode strings
|
||||
# for file/directory names when it should always be bytestrings.
|
||||
export PRETEND_UNICODE_ARGS=1
|
||||
|
||||
export TEST_SHELL_PATH=/bin/sh
|
||||
|
||||
failed=0
|
||||
|
||||
for test in t939*.sh; do
|
||||
./$test || failed=1
|
||||
for t in t[0-9]*.sh
|
||||
do
|
||||
printf '\n\n== %s ==\n' "$t"
|
||||
bash $t "$@" || failed=$(($failed+1))
|
||||
done
|
||||
exit $failed
|
||||
|
||||
if [ 0 -lt $failed ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user