diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-06-29 22:35:29 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-06-29 22:35:29 +0200 |
commit | 8c5c0138d71023079e9f0ac45f2f01a7e96784bc (patch) | |
tree | d15c4579c00fcb7d1f73a0d8f627b5ab398efbd1 /test/py/lib/test_repo | |
parent | log: minor refactoring (diff) | |
download | cimple-8c5c0138d71023079e9f0ac45f2f01a7e96784bc.tar.gz cimple-8c5c0138d71023079e9f0ac45f2f01a7e96784bc.zip |
test: shuffle files a bit
This should hopefully reduce clutter in the test/ directory.
Side note: if I leave the __init__.py file in the new py/ directory,
pytest fails with import errors. To make it work, I need to either
delete it or keep the __init__.py file in both test/ and py/. No idea
why.
Diffstat (limited to 'test/py/lib/test_repo')
-rwxr-xr-x | test/py/lib/test_repo/ci.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/py/lib/test_repo/ci.sh b/test/py/lib/test_repo/ci.sh new file mode 100755 index 0000000..804cdb3 --- /dev/null +++ b/test/py/lib/test_repo/ci.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o pipefail +shopt -s inherit_errexit lastpipe + +script_dir="$( dirname -- "${BASH_SOURCE[0]}" )" +script_dir="$( cd -- "$script_dir" && pwd )" +readonly script_dir + +ci_output_dir="$( git remote get-url origin )" +ci_output_dir="$ci_output_dir/output" +readonly ci_output_dir + +mkdir -p -- "$ci_output_dir" + +readonly ci_output_template=ci_XXXXXX + +ci_output_path="$( mktemp --tmpdir="$ci_output_dir" "$ci_output_template" )" +readonly ci_output_path + +timestamp="$( date --iso-8601=ns )" +readonly timestamp + +echo "A CI run happened at $timestamp" | tee -- "$ci_output_path" |