Теперь должен заработать
This commit is contained in:
commit
e478aa64ef
1 changed files with 37 additions and 1 deletions
36
.github/workflows/compile-and-test.yml
vendored
36
.github/workflows/compile-and-test.yml
vendored
|
@ -17,12 +17,20 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Make `makefile.sh` executable
|
- name: Make `makefile.sh` executable
|
||||||
|
<<<<<<< HEAD
|
||||||
run: |
|
run: |
|
||||||
chmod +x makefile.sh
|
chmod +x makefile.sh
|
||||||
|
|
||||||
- name: Run `makefile.sh` to prepare Makefile
|
- name: Run `makefile.sh` to prepare Makefile
|
||||||
run: |
|
run: |
|
||||||
./makefile.sh delete
|
./makefile.sh delete
|
||||||
|
=======
|
||||||
|
run: chmod +x makefile.sh
|
||||||
|
|
||||||
|
- name: Run `makefile.sh` to prepare Makefile
|
||||||
|
run: |
|
||||||
|
./makefile.sh
|
||||||
|
>>>>>>> 74e49f5ae5a7d912cdff72dc4a1573944672c1e8
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "::error::makefile.sh failed"
|
echo "::error::makefile.sh failed"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -45,6 +53,7 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
for file in t/*; do
|
for file in t/*; do
|
||||||
echo "Testing with file: $file"
|
echo "Testing with file: $file"
|
||||||
|
|
||||||
|
@ -55,3 +64,30 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
=======
|
||||||
|
# Проверяем, что папка с тестами есть:
|
||||||
|
if [ ! -d "t" ]; then
|
||||||
|
echo "::error::No directory 't' with test files"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for f in t/*; do
|
||||||
|
echo "======================="
|
||||||
|
echo "Testing with file: $f"
|
||||||
|
|
||||||
|
# Создаём файл с вводом
|
||||||
|
echo "0" > input.txt
|
||||||
|
echo "$f" >> input.txt
|
||||||
|
|
||||||
|
echo "DEBUG: cat -A input.txt"
|
||||||
|
cat -A input.txt # Посмотреть, нет ли там ^M
|
||||||
|
|
||||||
|
./a.out < input.txt
|
||||||
|
status=$?
|
||||||
|
|
||||||
|
if [ $status -ne 0 ]; then
|
||||||
|
echo "::error::Test failed for $f"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
>>>>>>> 74e49f5ae5a7d912cdff72dc4a1573944672c1e8
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue