Makes test bash script running on MSYS/Git Bash

Reenables Windows CI
This commit is contained in:
Tim Deve 2020-05-11 10:52:58 +01:00
parent ac2ad0c760
commit ba9b883fbd
8 changed files with 18 additions and 17 deletions

View File

@ -2,8 +2,9 @@ name: Windows CI
on:
push:
branches-ignore:
- '**'
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
@ -50,4 +51,5 @@ jobs:
run: stack test
- name: Run Carp Tests
run: ./run_carp_tests.ps1
shell: bash
run: ./run_carp_tests.sh --no_sdl

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e; # will make the script stop if there are any errors

View File

@ -2,9 +2,9 @@ if [ -z "$CARP" ]
then
if [ -z "$NIX_CC" ]
then
CARP="stack exec carp --"
CARP="stack exec carp"
else
CARP="cabal -v0 run carp --"
CARP="cabal -v0 run carp"
fi
fi
$CARP $*
$CARP "--" $*

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e;
name=$1

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e; # will make the script stop if there are any errors
set -u; # will make the script stop if there is use of undefined

View File

@ -1,10 +1,9 @@
#!/bin/sh
#!/usr/bin/env bash
# Checks the code (using --check) and compares the output to the .expected file
./carp.sh $1 --log-memory --check > test/output/$1.output.actual 2>&1
if ! diff test/output/$1.output.actual test/output/$1.output.expected; then
if ! diff --strip-trailing-cr test/output/$1.output.actual test/output/$1.output.expected; then
echo "$1 failed."
exit 1
else

View File

@ -1,11 +1,11 @@
#!/bin/sh
#!/usr/bin/env bash
# Runs the executable and compares its output to the .expected file
./carp.sh $1 --log-memory -b && \
./out/Untitled > test/output/$1.output.actual 2>&1
echo $1
./carp.sh $1 --log-memory -x > test/output/$1.output.actual 2>&1
if ! diff test/output/$1.output.actual test/output/$1.output.expected; then
if ! diff --strip-trailing-cr test/output/$1.output.actual test/output/$1.output.expected; then
echo "$1 failed."
exit 1
else

View File

@ -1,3 +1,3 @@
#!/bin/sh
#!/usr/bin/env bash
carp $1 --log-memory -x > test/output/$1.output.expected 2>&1