Skip to content
Merged
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
23 changes: 15 additions & 8 deletions docs/locale/en/LC_MESSAGES/user_guide/environment_variables.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-26 10:22+0200\n"
"POT-Creation-Date: 2025-05-29 19:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
Expand All @@ -32,20 +32,27 @@ msgstr ""

#: ../../../../docs/user_guide/environment_variables.rst:6
msgid ""
"``PPC_NUM_PROC``: Specifies the number of processes to launch. "
"Default: ``1``"
"``PPC_NUM_PROC``: Specifies the number of processes to launch. Default: "
"``1``"
msgstr ""

#: ../../../../docs/user_guide/environment_variables.rst:9
msgid ""
"``PPC_NUM_THREADS``: Specifies the number of threads to use. Default:"
" ``1``"
"``PPC_NUM_THREADS``: Specifies the number of threads to use. Default: "
"``1``"
msgstr ""

#: ../../../../docs/user_guide/environment_variables.rst:12
msgid ""
"``PPC_ASAN_RUN``: Specifies that application is compiler with "
"sanitizers. Used by ``scripts/run_tests.py`` to skip ``valgrind`` runs. "
"Default: ``0``"
"``PPC_ASAN_RUN``: Specifies that application is compiler with sanitizers."
" Used by ``scripts/run_tests.py`` to skip ``valgrind`` runs. Default: "
"``0``"
msgstr ""

#: ../../../../docs/user_guide/environment_variables.rst:15
msgid ""
"``PPC_IGNORE_TEST_TIME_LIMIT``: Specifies that test time limits are "
"ignored. Used by ``scripts/run_tests.py`` to disable time limit "
"enforcement. Default: ``0``"
msgstr ""

44 changes: 32 additions & 12 deletions docs/locale/ru/LC_MESSAGES/user_guide/environment_variables.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-26 10:22+0200\n"
"POT-Creation-Date: 2025-05-29 19:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: ru\n"
Expand All @@ -29,24 +29,44 @@ msgstr "Переменные окружения"
msgid ""
"The following environment variables can be used to configure the "
"project's runtime behavior:"
msgstr "Следующие переменные окружения могут использоваться для настройки поведения программы во время выполнения:"
msgstr ""
"Следующие переменные окружения могут использоваться для настройки "
"поведения программы во время выполнения:"

#: ../../../../docs/user_guide/environment_variables.rst:6
msgid ""
"``PPC_NUM_PROC``: Specifies the number of processes to launch. "
"Default: ``1``"
msgstr "``PPC_NUM_PROC``: задаёт количество запускаемых процессов. По умолчанию: ``1``"
"``PPC_NUM_PROC``: Specifies the number of processes to launch. Default: "
"``1``"
msgstr ""
"``PPC_NUM_PROC``: задаёт количество запускаемых процессов. По умолчанию: "
"``1``"

#: ../../../../docs/user_guide/environment_variables.rst:9
msgid ""
"``PPC_NUM_THREADS``: Specifies the number of threads to use. Default:"
" ``1``"
msgstr "``PPC_NUM_THREADS``: задаёт количество используемых потоков. По умолчанию: ``1``"
"``PPC_NUM_THREADS``: Specifies the number of threads to use. Default: "
"``1``"
msgstr ""
"``PPC_NUM_THREADS``: задаёт количество используемых потоков. По "
"умолчанию: ``1``"

#: ../../../../docs/user_guide/environment_variables.rst:12
msgid ""
"``PPC_ASAN_RUN``: Specifies that application is compiler with "
"sanitizers. Used by ``scripts/run_tests.py`` to skip ``valgrind`` runs. "
"Default: ``0``"
msgstr "``PPC_ASAN_RUN``: указывает, что приложение собрано с санитайзерами. Используется в ``scripts/run_tests.py`` для пропуска запусков под ``valgrind``. По умолчанию: ``0``"
"``PPC_ASAN_RUN``: Specifies that application is compiler with sanitizers."
" Used by ``scripts/run_tests.py`` to skip ``valgrind`` runs. Default: "
"``0``"
msgstr ""
"``PPC_ASAN_RUN``: указывает, что приложение собрано с санитайзерами. "
"Используется в ``scripts/run_tests.py`` для пропуска запусков под "
"``valgrind``. По умолчанию: ``0``"

#: ../../../../docs/user_guide/environment_variables.rst:15
#, fuzzy
msgid ""
"``PPC_IGNORE_TEST_TIME_LIMIT``: Specifies that test time limits are "
"ignored. Used by ``scripts/run_tests.py`` to disable time limit "
"enforcement. Default: ``0``"
msgstr ""
"``PPC_IGNORE_TEST_TIME_LIMIT``: указывает, что ограничения по времени выполнения тестов игнорируются. "
"Используется в ``scripts/run_tests.py`` для отключения контроля ограничений по времени. "
"По умолчанию: ``0``"

3 changes: 3 additions & 0 deletions docs/user_guide/environment_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ The following environment variables can be used to configure the project's runti

- ``PPC_ASAN_RUN``: Specifies that application is compiler with sanitizers. Used by ``scripts/run_tests.py`` to skip ``valgrind`` runs.
Default: ``0``

- ``PPC_IGNORE_TEST_TIME_LIMIT``: Specifies that test time limits are ignored. Used by ``scripts/run_tests.py`` to disable time limit enforcement.
Default: ``0``
5 changes: 4 additions & 1 deletion modules/core/task/src/task.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define _CRT_SECURE_NO_WARNINGS
#include "core/task/include/task.hpp"

#include <algorithm>
Expand Down Expand Up @@ -69,7 +70,9 @@ void ppc::core::Task::InternalTimeTest(const std::string &str) {
auto diff = static_cast<double>(duration) * 1e-9;

std::stringstream err_msg;
if (diff < kMaxTestTime) {
if (auto env = std::getenv("PPC_IGNORE_TEST_TIME_LIMIT"); env != nullptr && std::string(env) == "1") {
err_msg << "Test time:" << std::fixed << std::setprecision(10) << diff << " (no time limit)" << '\n';
} else if (diff < kMaxTestTime) {
err_msg << "Test time:" << std::fixed << std::setprecision(10) << diff << '\n';
} else {
err_msg << "\nTask execute time need to be: ";
Expand Down
Loading