Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .github/workflows/cmake.yml

This file was deleted.

28 changes: 10 additions & 18 deletions .github/workflows/integrationTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build

- name: Test
#working-directory: ${{github.workspace}}/build/apps/TestsApp
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# ну почему не из корня ...
#run: ctest -C ${{env.BUILD_TYPE}}
run: ./build/apps/IntegrationTestsApp/IntegrationTestsApp


- name: Configure project
run: sudo ${{github.workspace}}/scripts/prerun.sh --with-tex
- name: Check Refal installed
run: |
if ! command -v refc &> /dev/null; then
echo "Ошибка: Refal не установлен."
exit 1
fi
- name: Build Test File and check Reports
run: sudo ${{github.workspace}}/scripts/run_integration.sh
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ add_subdirectory(libs/InputGenerator)
add_subdirectory(apps/InterpreterApp)
add_subdirectory(apps/InputGeneratorApp)
add_subdirectory(apps/UnitTestsApp)
add_subdirectory(apps/IntegrationTestsApp)
add_subdirectory(apps/MetamorphicTestsApp)
37 changes: 0 additions & 37 deletions apps/IntegrationTestsApp/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion apps/IntegrationTestsApp/src/IntegrationTests.cpp

This file was deleted.

12 changes: 0 additions & 12 deletions apps/IntegrationTestsApp/src/main.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions scripts/install_packages.sh

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/integrationTests/1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Test {(aa)*} {a*} 3
Test (Glushkov {(aa)*}) {a*} 1
2 changes: 2 additions & 0 deletions scripts/integrationTests/2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A = Complement.Annote (Glushkov {a*}) !!
B = States.Reverse A
File renamed without changes.
56 changes: 56 additions & 0 deletions scripts/prerun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Скрипт должен быть запущен с использованием sudo."
exit 1
fi
with_tex=false
BASEDIR=$(pwd)
while [[ $# -gt 0 ]]; do
case "$1" in
--with-tex)
with_tex=true
shift
;;
*)
echo "Неверный аргумент: $1"
exit 1
;;
esac
done

# Добавление ключа репозитория
curl -s --compressed "https://xtoter.github.io/apt_packages/KEY.gpg" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt_packages.gpg >/dev/null
# Добавление репозитория
sudo curl -s --compressed -o /etc/apt/sources.list.d/my_list_file.list "https://xtoter.github.io/apt_packages/my_list_file.list"
# Обновление списка пакетов
apt update
apt install -y make cmake dos2unix wget dot2tex build-essential dos2unix refal5-old
if [ "$with_tex" = true ]; then
apt install -y texlive-latex-extra texlive-fonts-extra texlive-science texlive-lang-cyrillic

fi
# Начало компиляции ------------------------
echo "Начало сборки"
# Сборка рефал частей
cd $BASEDIR/refal
# Чистим все собранное
rm -f *rsl

for file in *.ref; do
# Проверка, существует ли файл
if [ -e "$file" ]; then
# Конвертация формата из DOS в UNIX
echo "Файл $file"
dos2unix "$file"
refc "$file"
fi
done

# Сборка чиполлино
cd $BASEDIR
rm -fR ./build
mkdir build
cd ./build/
cmake ../. && cmake --build .
# Конец
cat ./../scripts/chipollino.txt
15 changes: 11 additions & 4 deletions scripts/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,22 @@
* ```../test.txt``` - Тест (мы могли его генерировать)

## Linux <a name="Linux"></a>
ВНИМАНИЕ! Все скрипты запускаются из корня проекта!
### Установка
Запускайте ```prerun.sh``` - он соберет и скачает все необходимое!
(Если вы хотите установить TEX для генерации отчета используйте флаг ```--with-tex```)
### Проверка корректности установки
Чтобы проверить корректность установки можно запустить ```run_integration.sh```.
### Работа с проектом


Вы крутые, в текущем каталоге запускайте ```install_packages.sh``` - он соберет и скачает все необходимое!
Для запуска Chipollino запускайте ```runcode.sh```, предварительно положив ```Test.txt``` в корень проекта ```../.```

После запуска вы можете использовать :

* ```../resources/report.tex``` - сгенерированный Tex файл
* ```../report.pdf``` - сгенерированный Pdf файл (Если вы согласились с установкой Tex)
* ```../test.txt``` - Тест (мы могли его генерировать)
* ```resources/report.tex``` - сгенерированный Tex файл
* ```report.pdf``` - сгенерированный Pdf файл (Если вы согласились с установкой Tex)
* ```test.txt``` - Тест (мы могли его генерировать)

## Windows (ReactOS) <a name="Windows"></a>

Expand Down
File renamed without changes.
22 changes: 22 additions & 0 deletions scripts/run_integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Скрипт должен быть запущен с использованием sudo."
exit 1
fi
BASEDIR=$(pwd)
for test_file in $BASEDIR/scripts/integrationTests/*; do
sudo rm -rf *report* *pdflatex*
echo "$test_file"
sudo $BASEDIR/build/apps/InterpreterApp/InterpreterApp $test_file
# Проверка наличия и непустоты файла rendered_report.pdf
if [ ! -s "rendered_report.pdf" ]; then
echo "Ошибка: Файл rendered_report.pdf отсутствует или пуст."
exit 1
fi

# Проверка наличия и непустоты файла report.pdf
if [ ! -s "report.pdf" ]; then
echo "Ошибка: Файл report.pdf отсутствует или пуст."
exit 1
fi
done