travis: add itest on Windows
This commit adds an integration test that runs on a Windows virtual machine on Travis. The tests run inside of a "Git Bash" environment which supports the same command line syntax as a proper bash but doesn't have all the tooling installed. Some tools also behave differently on Windows. Therefore we also have to simplify the command to upload the logs to termbin and remove the upload to file.io on Windows because both the find and tar command don't work as expected.
This commit is contained in:
parent
6115a7b12b
commit
a6a7aca8af
31
.travis.yml
31
.travis.yml
@ -68,7 +68,32 @@ jobs:
|
||||
- GOARM=7 GOARCH=arm GOOS=linux CGO_ENABLED=0 make itest-only
|
||||
arch: arm64
|
||||
|
||||
- name: Btcd Integration Windows
|
||||
script:
|
||||
- make itest-windows
|
||||
os: windows
|
||||
before_install:
|
||||
- choco upgrade --no-progress -y make netcat curl findutils
|
||||
- export MAKE=mingw32-make
|
||||
after_script:
|
||||
- |-
|
||||
case $TRAVIS_OS_NAME in
|
||||
windows)
|
||||
echo "Uploading to termbin.com..."
|
||||
for f in ./lntest/itest/*.log; do cat $f | nc termbin.com 9999 | xargs -r0 printf "$f"' uploaded to %s'; done
|
||||
;;
|
||||
esac
|
||||
|
||||
after_script:
|
||||
- LOG_FILES=./lntest/itest/*.log
|
||||
- echo "Uploading to termbin.com..." && find $LOG_FILES | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
||||
- echo "Uploading to file.io..." && tar -zcvO $LOG_FILES | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'
|
||||
- |-
|
||||
case $TRAVIS_OS_NAME in
|
||||
windows)
|
||||
# Needs other commands, see after_script of the Windows build
|
||||
;;
|
||||
|
||||
*)
|
||||
LOG_FILES=./lntest/itest/*.log
|
||||
echo "Uploading to termbin.com..." && find $LOG_FILES | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
||||
echo "Uploading to file.io..." && tar -zcvO $LOG_FILES | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user