-
Notifications
You must be signed in to change notification settings - Fork 0
Enable GitHub actions cmp tests #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
just_simple_test.cpp
Outdated
| std::vector<int> xs; | ||
| xs.reserve(100500); | ||
| xs.clear(); | ||
| EXPECT_CMP(xs.capacity(), ==, 0) << " ahaha ? ahaha!"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я перенёс и отрефакторил этот файл, пожалуйста, отребейзься на свежий мастер
| { | ||
| "name": "just_simple_test", | ||
| "setup": "", | ||
| "run": "CI=1 cmake . && make just_simple_test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше, наверно, не через окружение (мало ли, будет конфликтовать), а через дефайны комстроки?
cmake . -Ddisable_gtest=1 && .....
| { | ||
| "tests": [ | ||
| { | ||
| "name": "just_simple_test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я сделал семейство заведомо позитивных и заведомо негативных тестовых файлов.
Нужно как-то учесть это в скрипте CI.
| #### Arguments | ||
|
|
||
| ``` | ||
| ```c++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Здесь баш, а не C++
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra-semi -O1 -g -fsanitize=address -fno-omit-frame-pointer") | ||
| endif() | ||
|
|
||
| if(DEFINED ENV{CI}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше не через ENV управлять, наверное.
А также можно попробовать сделать локальную сборку GTest
Добавляю прогон тестов в окружении CI, который используется в домашках и дорешках
Сейчас в них производится только компиляция, без запуска. Надо дочинить и включить запуск и понапихать какие-то более адекватные проверки