mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Makes test bash script running on MSYS/Git Bash
Reenables Windows CI
This commit is contained in:
parent
ac2ad0c760
commit
ba9b883fbd
8
.github/workflows/windows.yml
vendored
8
.github/workflows/windows.yml
vendored
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e; # will make the script stop if there are any errors
|
||||
|
||||
|
6
carp.sh
6
carp.sh
@ -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 "--" $*
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e;
|
||||
|
||||
name=$1
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
carp $1 --log-memory -x > test/output/$1.output.expected 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user