test: Update 4 files
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 8s
Build-Test-Publish / build (linux/arm64) (push) Failing after 10s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 8s
Build-Test-Publish / build (linux/arm64) (push) Failing after 10s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
This commit is contained in:
@ -42,15 +42,11 @@ docker run --rm \
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Quick architecture check - the binary should at least start
|
||||
if ! timeout 5 ./dehydrate_test 2>/dev/null; then
|
||||
# If it fails to run, check if it's an architecture mismatch
|
||||
if file dehydrate_test | grep -q 'cannot execute'; then
|
||||
echo 'ERROR: Binary architecture mismatch'
|
||||
echo 'Host arch:' && uname -m
|
||||
echo 'Binary info:' && file dehydrate_test
|
||||
exit 1
|
||||
fi
|
||||
# Quick architecture check - just verify the binary format
|
||||
if ! file dehydrate_test | grep -q 'executable'; then
|
||||
echo 'ERROR: Generated file is not an executable'
|
||||
file dehydrate_test
|
||||
exit 1
|
||||
fi
|
||||
"
|
||||
|
||||
@ -62,5 +58,13 @@ if [ ! -f "./dehydrate_test" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Fix ownership of the binary (created by Docker as root)
|
||||
if [ "$(stat -c %u ./dehydrate_test)" != "$(id -u)" ]; then
|
||||
# Use Docker to change ownership to current user
|
||||
docker run --rm -v "$PROJECT_DIR":/workdir -w /workdir/test \
|
||||
gitea.jde.nz/public/dropshell-build-base:latest \
|
||||
chown "$(id -u):$(id -g)" dehydrate_test
|
||||
fi
|
||||
|
||||
# Run the test
|
||||
./dehydrate_test
|
Reference in New Issue
Block a user