Merge
This commit is contained in:
parent
e478aa64ef
commit
aeaa25d6eb
1 changed files with 1 additions and 37 deletions
38
.github/workflows/compile-and-test.yml
vendored
38
.github/workflows/compile-and-test.yml
vendored
|
@ -17,20 +17,12 @@ 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
|
||||||
|
@ -53,7 +45,6 @@ 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"
|
||||||
|
|
||||||
|
@ -63,31 +54,4 @@ jobs:
|
||||||
echo "::error::Test failed for $file"
|
echo "::error::Test failed for $file"
|
||||||
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