mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
test: run from host
This commit is contained in:
@ -42,4 +42,4 @@ COPY --from=vttest /vttest /usr/bin/vttest
|
||||
|
||||
COPY ./run.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
BIN
test/cases/vttest/1_1.sh.png
Normal file
BIN
test/cases/vttest/1_1.sh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
12
test/run-host.sh
Executable file
12
test/run-host.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This runs a single test case from the host (not from Docker itself). The
|
||||
# arguments are the same as run.sh but this wraps it in docker.
|
||||
|
||||
docker run \
|
||||
--init \
|
||||
--rm \
|
||||
-v $(pwd):/src \
|
||||
--entrypoint "xvfb-run" \
|
||||
$(docker build -q .) \
|
||||
/entrypoint.sh $@
|
@ -19,16 +19,21 @@ function has_func() {
|
||||
#--------------------------------------------------------------------
|
||||
# Flag parsing
|
||||
|
||||
ARG_UPDATE=0
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
-e|--exec) ARG_EXEC="$2"; shift ;;
|
||||
-c|--case) ARG_CASE="$2"; shift ;;
|
||||
-o|--output) ARG_OUT="$2"; shift ;;
|
||||
-u|--update) ARG_UPDATE=1 ;;
|
||||
*) echo "Unknown parameter passed: $1"; exit 1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# If we're updating, then just update the file in-place
|
||||
if [ "$ARG_UPDATE" -eq 1 ]; then ARG_OUT="${ARG_CASE}.png"; fi
|
||||
|
||||
bad=0
|
||||
if [ -z "$ARG_EXEC" ]; then bad=1; fi
|
||||
if [ -z "$ARG_CASE" ]; then bad=1; fi
|
||||
|
Reference in New Issue
Block a user