diff --git a/README.md b/README.md
index 46533562..1d070606 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ they lack some built-in mechanisms for verifying packages and finding mistakes
before uploading the package to the judge system.
As sinol-make was created specifically for the sio2 problem packages,
by default it downloads and uses sio2's deterministic mechanism of measuring
-solutions' runtime, called `oiejq`.
+solutions' runtime, called `sio2jail`.
### Installation
@@ -43,7 +43,7 @@ pip3 install sinol-make
so make sure this directory is in your `PATH`.
[Here's](https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7) how to add a directory to `PATH`.
-As `oiejq` works only on Linux-based operating systems,
+As `sio2jail` works only on Linux-based operating systems,
*we do not recommend* using operating systems such as Windows or macOS.
Nevertheless `sinol-make` supports those operating systems,
though there are additional installation steps required to use
@@ -67,8 +67,8 @@ activate-global-python-argcomplete
The available commands (see `sinol-make --help`) are:
- `sinol-make run` -- Runs selected solutions (by default all solutions) on selected tests (by default all tests) with a given number
-of CPUs. Measures the solutions' time with oiejq, unless specified otherwise. After running the solutions, it
-compares the solutions' scores with the ones saved in config.yml. If you're using oiejq, make sure you are not running on efficiency
+of CPUs. Measures the solutions' time with sio2jail, unless specified otherwise. After running the solutions, it
+compares the solutions' scores with the ones saved in config.yml. If you're using sio2jail, make sure you are not running on efficiency
cpu cores. You can check if you have them [like this](https://stackoverflow.com/a/71282744). To run on normal cpu cores, use
`taskset -c 8-15 sinol-make ...`, assuming that cpu cores 8-15 are not efficiency cores.
Run `sinol-make run --help` to see available flags.
@@ -113,15 +113,15 @@ There are also available short aliases for the commands:
the contest type with the `sinol_contest_type` key in config. Here is the table of available contest types and their
features:
-| Feature | `default` | `oi` | `oij` | `icpc` |
-|-----------------------------------------------------------------------------------------------------|-----------|-------|-------|--------|
-| Max score | 100 | 100 | 100 | 1 |
-| Default time tool | oiejq | oiejq | oiejq | time |
-| Full score if took less than half of the time limit,
otherwise linearly decreasing to 1. | ❌ | ✔️ | ❌ | ❌ |
-| Full score if took less than the time limit | ✔️ | ❌ | ✔️ | ✔️ |
-| Scores must sum up to 100 | ❌ | ✔️ | ✔️ | ❌ |
-| Limits can be set for individual tests | ✔️ | ❌ | ✔️ | ✔️ |
-| Verifies if tests are named correctly
(letters within groups increase, group numbers increase) | ❌ | ✔️ | ✔️ | ✔️ |
+| Feature | `default` | `oi` | `oij` | `icpc` |
+|-----------------------------------------------------------------------------------------------------|-----------|----------|----------|--------|
+| Max score | 100 | 100 | 100 | 1 |
+| Default time tool | sio2jail | sio2jail | sio2jail | time |
+| Full score if took less than half of the time limit,
otherwise linearly decreasing to 1. | ❌ | ✔️ | ❌ | ❌ |
+| Full score if took less than the time limit | ✔️ | ❌ | ✔️ | ✔️ |
+| Scores must sum up to 100 | ❌ | ✔️ | ✔️ | ❌ |
+| Limits can be set for individual tests | ✔️ | ❌ | ✔️ | ✔️ |
+| Verifies if tests are named correctly
(letters within groups increase, group numbers increase) | ❌ | ✔️ | ✔️ | ✔️ |
### Reporting bugs and contributing code
diff --git a/setup.cfg b/setup.cfg
index 85505e9f..0ed68cbf 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -51,4 +51,4 @@ testpaths =
tests
markers =
github_runner: Mark tests that require GitHub runner
- oiejq: Mark tests that require working oiejq
+ sio2jail: Mark tests that require working sio2jail
diff --git a/src/sinol_make/executors/sio2jail.py b/src/sinol_make/executors/sio2jail.py
index 1a5370b1..1cae0762 100644
--- a/src/sinol_make/executors/sio2jail.py
+++ b/src/sinol_make/executors/sio2jail.py
@@ -25,8 +25,10 @@ def _execute(self, command: List[str], time_limit: int, hard_time_limit: int, me
result_file_path: str, executable: str, execution_dir: str, stdin: int, stdout: int,
stderr: Union[None, int], fds_to_close: Union[None, List[int]],
*args, **kwargs) -> Tuple[bool, bool, int, List[str]]:
+ env = os.environ.copy()
+ env['UNDER_SIO2JAIL'] = 1
with open(result_file_path, "w") as result_file:
- process = subprocess.Popen(' '.join(command), *args, shell=True, stdin=stdin, stdout=stdout,
+ process = subprocess.Popen(' '.join(command), *args, shell=True, stdin=stdin, stdout=stdout, env=env,
stderr=result_file, preexec_fn=os.setpgrp, cwd=execution_dir, **kwargs)
if fds_to_close is not None:
for fd in fds_to_close:
diff --git a/tests/packages/lim/prog/lim2.cpp b/tests/packages/lim/prog/lim2.cpp
index 7c0923ac..662d64bb 100644
--- a/tests/packages/lim/prog/lim2.cpp
+++ b/tests/packages/lim/prog/lim2.cpp
@@ -12,7 +12,7 @@ void s2j_wait(long long instructions) {
}
int wait(int secs) {
- if (getenv("UNDER_OIEJQ") != NULL) {
+ if (getenv("UNDER_SIO2JAIL") != NULL) {
s2j_wait((long long)secs * 2'000'000'000);
return 0;
}
diff --git a/tests/packages/ovl/prog/ovl.cpp b/tests/packages/ovl/prog/ovl.cpp
index 8fe4ccff..41244b18 100644
--- a/tests/packages/ovl/prog/ovl.cpp
+++ b/tests/packages/ovl/prog/ovl.cpp
@@ -12,7 +12,7 @@ void s2j_wait(long long instructions) {
}
int wait(int secs) {
- if (getenv("UNDER_OIEJQ") != NULL) {
+ if (getenv("UNDER_SIO2JAIL") != NULL) {
s2j_wait((long long)secs * 2'000'000'000);
return 0;
}
diff --git a/tests/packages/vso/prog/vso4.cpp b/tests/packages/vso/prog/vso4.cpp
index 53053f1a..a98acba2 100644
--- a/tests/packages/vso/prog/vso4.cpp
+++ b/tests/packages/vso/prog/vso4.cpp
@@ -22,7 +22,7 @@ void s2j_wait(long long instructions) {
}
int wait(int secs) {
- if (getenv("UNDER_OIEJQ") != NULL) {
+ if (getenv("UNDER_SIO2JAIL") != NULL) {
s2j_wait((long long)secs * 2'000'000'000);
return 0;
}
diff --git a/tests/packages/vso/prog/vso7.cpp b/tests/packages/vso/prog/vso7.cpp
index f84a630e..ef1503e2 100644
--- a/tests/packages/vso/prog/vso7.cpp
+++ b/tests/packages/vso/prog/vso7.cpp
@@ -22,7 +22,7 @@ void s2j_wait(long long instructions) {
}
int wait(int secs) {
- if (getenv("UNDER_OIEJQ") != NULL) {
+ if (getenv("UNDER_SIO2JAIL") != NULL) {
s2j_wait((long long)secs * 2'000'000'000);
return 0;
}
diff --git a/tests/test_sio2jail.py b/tests/test_sio2jail.py
index 2c0850da..da193d17 100644
--- a/tests/test_sio2jail.py
+++ b/tests/test_sio2jail.py
@@ -80,7 +80,7 @@ def test_perf_counters_set():
@pytest.mark.github_runner
def test_updating():
"""
- Test updating oiejq
+ Test updating sio2jail
"""
if sys.platform != 'linux':
return