Repository navigation
e2e-ish: generate e2e tests from e2e-ish tests. - #849
Merged
Merged
Conversation
klihub
added this pull request to stack #848
October 14, 2026 19:35
klihub
marked this pull request as ready for review
October 14, 2026 19:46
askervin
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 15, 2026 06:14
459388f to
4a32c0c
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 15, 2026 07:05
4a32c0c to
c62b51a
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
4 times, most recently
from
October 16, 2026 17:44
7ad471c to
ad95f0c
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 19, 2026 15:15
ad95f0c to
5c5c32b
Compare
bart0sh
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 19, 2026 15:25
5c5c32b to
bb5b053
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
2 times, most recently
from
October 19, 2026 19:23
b76ec6a to
c4b0b7d
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 20, 2026 07:55
c4b0b7d to
2526624
Compare
klihub
removed this pull request from stack #848
October 20, 2026 08:38
klihub
added this pull request to stack #867
October 20, 2026 08:39
bart0sh
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 20, 2026 09:11
2526624 to
2c0d28b
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 20, 2026 11:26
2c0d28b to
664aeea
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 20, 2026 11:33
664aeea to
8fdafea
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 20, 2026 19:04
8fdafea to
212f6dd
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 21, 2026 17:12
61d4be0 to
04fdce7
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 21, 2026 19:31
04fdce7 to
50a64b5
Compare
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
2 times, most recently
from
October 22, 2026 07:32
fd3d43f to
ffb705d
Compare
Base automatically changed from
stacked/klihub/e2eish/go-verified-tests
to
main
October 22, 2026 10:57
askervin
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 22, 2026 10:57
ffb705d to
6cacc34
Compare
revTr is the inverse of translatePy. It gives the e2e verify
expression of a require assertion of a Script, like
len(cpus["pod0c0"]) == 1 for require.Len(t, s.CPUs("pod0c0"), 1).
A test reverses every assertion of the generated tests and
translates it forward again. readTopology reads topology.var.json
to determine the widths of names to generate.
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 22, 2026 11:12
6cacc34 to
b5adc1f
Compare
Add NewE2EScript which can be used to define an e2eish unit test which gets translated into a corresponding e2e test on success, if E2EISH_EMIT is set. The resulting test is written to the named target, for instance n4c16/test50-name. The defined test's steps record their e2e commands as they run, with the line of the test calling them. The source of the test gives the order of the statements, and its assertions are translated back to python. Anything else is refused. An e2e test dir with the same files is left alone. One which differs is an error, unless E2EISH_EMIT_FORCE=1 is set. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
emit_tests.sh writes the e2e tests of an e2eish tests of a policy made with NewE2EScript. TestE2eishExample is an example of such a test, the source of n4c16/test99-e2eish-example. It is skipped unless E2EISH_EXAMPLES=1 is set. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
run_tests.sh -o writes the output of a run into a directory of its own, with no VM directory in the path, and the generator took the topology from that VM. Such a log named a topology which does not exist and the generation stopped. Match the machine its launches asked for against the topology.var.json of each topology instead. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
klihub
force-pushed
the
stacked/klihub/e2eish/reverse-gen
branch
from
October 22, 2026 12:13
b5adc1f to
c4a53bd
Compare
Comment on lines
+242
to
+245
| add(fmt.Sprintf("LABEL%d", i), k+": "+strconv.Quote(spec.Labels[k])) | ||
| } | ||
| for i, k := range slices.Sorted(maps.Keys(spec.Annotations)) { | ||
| add(fmt.Sprintf("ANN%d", i), k+": "+strconv.Quote(spec.Annotations[k])) |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Add support for reverse-generating e2e tests from e2e-ish unit tests, for those tests which are specifically defined as such, by using the new NewE2EScript(). If E2EISH_EMIT=1 is set, corresponding e2e tests will be generated for such e2e-ish unit tests on succesful completion.
This can be used (in some cases) to first iron out all implementation details using e2e-ish unit tests, and once everything is working generate a corresponding e2e test for final and subsequent future verification.