Skip to content
Merged
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
31 changes: 15 additions & 16 deletions spec/2023-07-draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ The `secret` directory must exist, and contain either some test cases, or some [

All files and directories associated with a single test case have the same base name with varying extensions.
Here, base name is defined to be the relative path from the `data` directory to the test case input file, without extensions.
For example, the files `secret/test.in` and `secret/test.ans` are associated with the same test case that has the base name `secret/test`.
This is the name of the test case.
For example, the files `secret/test.in` and `secret/test.ans` are associated with the same test case that has the name `secret/test`.
The existence of the `.in` file declares the existence of the test case.
If the test case exists, then an associated `.ans` file must exist while the others are optional.
If the test case does not exist, then the other files must not exist.
Expand All @@ -561,7 +562,7 @@ as well as the `args` sequence in the `.yaml` file, then the input of the two te
This means that for any two test cases, if their input, output validator arguments and the contents of their `.ans` files are equivalent, then the test cases are equivalent.
The assumption of determinism means that a judge system could choose to reuse the result of a previous run, or to re-run the equivalent test case.

Test cases and [test data groups](#test-data-groups) will be used in lexicographical order on base name.
Test cases and [test data groups](#test-data-groups) will be used in lexicographical order on test case or test group name.
It is good practice to use a numbered prefix such as `00`, `01`, `02`, `03`, and so on, to get the desired order of test cases, while keeping the file names descriptive.
Remember that the numbered prefixes should be zero padded to the same length to get the expected lexicographical order.

Expand Down Expand Up @@ -591,6 +592,8 @@ The secret data may be subdivided into test data groups.
Every subdirectory of `data/secret/` is a test data group and may contain a `test_group.yaml` configuration file.
`data/secret` can only have test data groups *or* test cases, never both.
That is, if there are any directories under `data/secret/` there must not be any `.in` files directly in `data/secret/` and vice versa.
The name of a test data group is the path under `data/`.
For example, the test data group defined by the directory `data/secret/group1` has the name `secret/group1`.

The test data groups themselves can contain directories, but not further groups.
This means that there are no `test_group.yaml` further down in the directory hierarchy.
Expand All @@ -601,7 +604,7 @@ Each test data group must contain at least one test case, or a static validation

Each test case can supply input via standard input, command-line arguments, and/or the file system.
These options are not exclusive.
For a test case with base name `test`, the file `test.in` is piped to the submission as standard input.
For a test case with name `test`, the file `test.in` is piped to the submission as standard input.
The submission will be run with the `args` sequence defined in the `test.yaml` file as command-line arguments.
Note that usually the submission's entry point, whether it be a binary or an interpreted file, will be the absolute first command line argument.
However, there exist languages, such as Java, where there is no initial command line argument representing the entry point.
Expand All @@ -613,7 +616,6 @@ possibly overwriting the compiled submission file or included data in the case o
### Test Case Configuration

One YAML file with additional configuration may be provided per test case.
The file must share the base name of the associated test case.

The allowed keys are defined as follows.
Keys are optional unless explicitly stated.
Expand Down Expand Up @@ -653,7 +655,6 @@ For each test case:

An illustration provides a visualization of the associated test case, meant for the judges.
At most one illustration file may be provided per test case.
The file must share the base name of the associated test case.
The supported file extensions are `.png`, `.jpg`, `jpeg`, and `.svg`.

### Invalid Test Cases
Expand Down Expand Up @@ -1358,15 +1359,13 @@ The submission score is the score of `secret`.

It is a judge error if the score of `secret` or any test data group exceeds its `max_score`.

#### Required Dependent Groups
#### Group Dependencies

A test data group or `secret` may specify that it depends on some other test data groups or `sample`.
Each required group must have `pass-fail` aggregation.
The dependent group will only be run if the group being depended on receives an accepted verdict for all test cases in the group.
If the dependent group is not run, the group score is 0.

The paths of these required groups, relative to the `data` folder, are listed under the `require_pass` key.
A path consists of zero or more directory names followed by a directory or file name, with a `/` character separating consecutive names. Each name must conform to the [general requirements](#general-requirements) on directory and file names and the specified test data group must exist.

A group must not depend on a group that is lexicographically earlier than itself.
A group must not depend on a group that is hierarchally above itself.
A test data group, or `secret` may specify that it depends on some other test data groups.
Note that `secret` may only depend on `sample`.
Also, note that `sample` cannot depend on any group.
Each group mentioned under `require_pass` must have `pass-fail` aggregation.
The group specifying `require_pass` will only be run if the group being referred to receives an accepted verdict for all test cases in the group.
If the group is not run, the group score is 0, and all test cases in the group are treated as having received a verdict that is not accepted.
The `require_pass` is set to the name of a single test data group, or `sample`, or a sequence of such names.
All groups listed in `require_pass` must come lexicographically earlier than the group it is specified for.