atex 0.2__tar.gz → 0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- atex-0.3/PKG-INFO +102 -0
- {atex-0.2 → atex-0.3}/pyproject.toml +2 -1
- atex-0.2/PKG-INFO +0 -13
- {atex-0.2 → atex-0.3}/.editorconfig +0 -0
- {atex-0.2 → atex-0.3}/.gitignore +0 -0
- {atex-0.2 → atex-0.3}/COPYING.txt +0 -0
- {atex-0.2 → atex-0.3}/README.md +0 -0
- {atex-0.2 → atex-0.3}/atex/__init__.py +0 -0
- {atex-0.2 → atex-0.3}/atex/cli/__init__.py +0 -0
- {atex-0.2 → atex-0.3}/atex/cli/testingfarm.py +0 -0
- {atex-0.2 → atex-0.3}/atex/fmf.py +0 -0
- {atex-0.2 → atex-0.3}/atex/minitmt/CONTROL_FILE.md +0 -0
- {atex-0.2 → atex-0.3}/atex/minitmt/README.md +0 -0
- {atex-0.2 → atex-0.3}/atex/minitmt/RESULTS.md +0 -0
- {atex-0.2 → atex-0.3}/atex/minitmt/__init__.py +0 -0
- {atex-0.2 → atex-0.3}/atex/minitmt/report.py +0 -0
- {atex-0.2 → atex-0.3}/atex/minitmt/scripts.py +0 -0
- {atex-0.2 → atex-0.3}/atex/minitmt/testme.py +0 -0
- {atex-0.2 → atex-0.3}/atex/orchestrator.py +0 -0
- {atex-0.2 → atex-0.3}/atex/provision/__init__.py +0 -0
- {atex-0.2 → atex-0.3}/atex/provision/libvirt/VM_PROVISION +0 -0
- {atex-0.2 → atex-0.3}/atex/provision/libvirt/__init__.py +0 -0
- {atex-0.2 → atex-0.3}/atex/provision/libvirt/setup-libvirt.sh +0 -0
- {atex-0.2 → atex-0.3}/atex/ssh.py +0 -0
- {atex-0.2 → atex-0.3}/atex/testingfarm.py +0 -0
- {atex-0.2 → atex-0.3}/atex/util/README.md +0 -0
- {atex-0.2 → atex-0.3}/atex/util/__init__.py +0 -0
- {atex-0.2 → atex-0.3}/atex/util/dedent.py +0 -0
- {atex-0.2 → atex-0.3}/atex/util/lockable_class.py +0 -0
- {atex-0.2 → atex-0.3}/atex/util/log.py +0 -0
- {atex-0.2 → atex-0.3}/atex/util/subprocess.py +0 -0
- {atex-0.2 → atex-0.3}/logtest.py +0 -0
- {atex-0.2 → atex-0.3}/reporter.py +0 -0
- {atex-0.2 → atex-0.3}/ssh.py +0 -0
- {atex-0.2 → atex-0.3}/tests/PYTEST.md +0 -0
- {atex-0.2 → atex-0.3}/tests/foobar.py +0 -0
- {atex-0.2 → atex-0.3}/tf.py +0 -0
atex-0.3/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: atex
|
|
3
|
+
Version: 0.3
|
|
4
|
+
Summary: Ad-hoc Test EXecutor
|
|
5
|
+
Project-URL: Homepage, https://github.com/RHSecurityCompliance/atex
|
|
6
|
+
License-Expression: GPL-3.0-or-later
|
|
7
|
+
License-File: COPYING.txt
|
|
8
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Topic :: Software Development :: Testing
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Requires-Dist: fmf>=1.6
|
|
13
|
+
Requires-Dist: urllib3<3,>=2
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# ATEX = Ad-hoc Test EXecutor
|
|
17
|
+
|
|
18
|
+
A collections of Python APIs to provision operating systems, collect
|
|
19
|
+
and execute [FMF](https://github.com/teemtee/fmf/)-style tests, gather
|
|
20
|
+
and organize their results and generate reports from those results.
|
|
21
|
+
|
|
22
|
+
The name comes from a (fairly unique to FMF/TMT ecosystem) approach that
|
|
23
|
+
allows provisioning a pool of systems and scheduling tests on them as one would
|
|
24
|
+
on an ad-hoc pool of thread/process workers - once a worker becomes free,
|
|
25
|
+
it receives a test to run.
|
|
26
|
+
This is in contrast to splitting a large list of N tests onto M workers
|
|
27
|
+
like N/M, which yields significant time penalties due to tests having
|
|
28
|
+
very varies runtimes.
|
|
29
|
+
|
|
30
|
+
Above all, this project is meant to be a toolbox, not a silver-plate solution.
|
|
31
|
+
Use its Python APIs to build a CLI tool for your specific use case.
|
|
32
|
+
The CLI tool provided here is just for demonstration / testing, not for serious
|
|
33
|
+
use - we want to avoid huge modular CLIs for Every Possible Scenario. That's
|
|
34
|
+
the job of the Python API. Any CLI should be simple by nature.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
THIS PROJECT IS HEAVILY WIP, THINGS WILL MOVE AROUND, CHANGE AND OTHERWISE
|
|
39
|
+
BREAK. DO NOT USE IT (for now).
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
Unless specified otherwise, any content within this repository is distributed
|
|
46
|
+
under the GNU GPLv3 license, see the [COPYING.txt](COPYING.txt) file for more.
|
|
47
|
+
|
|
48
|
+
## Unsorted notes
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
- this is not tmt, the goal is to make a python toolbox *for* making runcontest
|
|
52
|
+
style tools easily, not to replace those tools with tmt-style CLI syntax
|
|
53
|
+
|
|
54
|
+
- the whole point is to make usecase-targeted easy-to-use tools that don't
|
|
55
|
+
intimidate users with 1 KB long command line, and runcontest is a nice example
|
|
56
|
+
|
|
57
|
+
- TL;DR - use a modular pythonic approach, not a modular CLI like tmt
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
- Orchestrator with
|
|
61
|
+
- add_provisioner(<class>, max_workers=1) # will instantiate <class> at most max_workers at a time
|
|
62
|
+
- algo
|
|
63
|
+
- for all provisioner classes, spawns classes*max_workers as new Threads
|
|
64
|
+
- waits for any .reserve() to return
|
|
65
|
+
- creates a new Thread for minitmt, gives it p.get_ssh() details
|
|
66
|
+
- minitmt will
|
|
67
|
+
- establish a SSHConn
|
|
68
|
+
- install test deps, copy test repo over, prepare socket dir on SUT, etc.
|
|
69
|
+
- run the test in the background as
|
|
70
|
+
f=os.open('some/test/log', os.WRONLY); subprocess.Popen(..., stdout=f, stderr=f, stdin=subprocess.DEVNULL)
|
|
71
|
+
- read/process Unix sock results in the foreground, non-blocking,
|
|
72
|
+
probably calling some Orchestrator-provided function to store results persistently
|
|
73
|
+
- regularly check Popen proc status, re-accept UNIX sock connection, etc., etc.
|
|
74
|
+
- minitmt also has some Thread-independent way to .cancel(), killing the proc, closing SSHConn, etc.
|
|
75
|
+
|
|
76
|
+
- while waiting for minitmt Threads to finish, to re-assign existing Provisioner instances
|
|
77
|
+
to new minitmt Threads, .. Orchestrator uses some logic to select, which TestRun
|
|
78
|
+
would be ideal to run next
|
|
79
|
+
- TestRun probably has some "fitness" function that returns some priority number
|
|
80
|
+
when given a Provisioner instance (?) ...
|
|
81
|
+
- something from minitmt would also have access to the Provisioner instance
|
|
82
|
+
- the idea is to allow some logic to set "hey I set up nested VM snapshot on this thing"
|
|
83
|
+
on the Provisioner instance, and if another /hardening/oscap TestRun finds
|
|
84
|
+
a Provisioner instance like that, it would return high priority
|
|
85
|
+
- ...
|
|
86
|
+
- similar to "fitness" like function, we need some "applicability" function
|
|
87
|
+
- if TestRun is mixed to RHEL-9 && x86_64, we need it to return True
|
|
88
|
+
for a Provisioner instance that provides RHEL-9 and x86_64, but False otherwise
|
|
89
|
+
|
|
90
|
+
- basically Orchestrator has
|
|
91
|
+
- .add_provisioner()
|
|
92
|
+
- .run_test() # called with an exclusively-borrowed Provisioner instance
|
|
93
|
+
- if Provisioner is_alive()==False after .run_test(), instantiate a new one from the same inst.__class__
|
|
94
|
+
- if test failed and reruns > 0, try run_test() again (or maybe re-queue the test)
|
|
95
|
+
- .output_result() # called by run_test() to persistently log a test result
|
|
96
|
+
- .applicable() # return True if a passed TestRun is meant for a passed Platform (Provisioner?)
|
|
97
|
+
- if no TestRun returns True, the Provisioner is .release()d because we don't need it anymore
|
|
98
|
+
- .fitness() # return -inf / 0 / +inf with how much should a passed TestRun run on a Provisioner
|
|
99
|
+
- MAYBE combine applicable() and fitness() into one function, next_test() ?
|
|
100
|
+
- given the free Provisioner and a list of TestRuns, select which should run next on the Provisioner
|
|
101
|
+
- if none is chosen, .release() the Provisioner without replacement, continue
|
|
102
|
+
```
|
atex-0.2/PKG-INFO
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: atex
|
|
3
|
-
Version: 0.2
|
|
4
|
-
Summary: Ad-hoc Test EXecutor
|
|
5
|
-
Project-URL: Homepage, https://github.com/RHSecurityCompliance/atex
|
|
6
|
-
License-Expression: GPL-3.0-or-later
|
|
7
|
-
License-File: COPYING.txt
|
|
8
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Topic :: Software Development :: Testing
|
|
11
|
-
Requires-Python: >=3.9
|
|
12
|
-
Requires-Dist: fmf>=1.6
|
|
13
|
-
Requires-Dist: urllib3<3,>=2
|
|
File without changes
|
{atex-0.2 → atex-0.3}/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
{atex-0.2 → atex-0.3}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{atex-0.2 → atex-0.3}/logtest.py
RENAMED
|
File without changes
|
|
File without changes
|
{atex-0.2 → atex-0.3}/ssh.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{atex-0.2 → atex-0.3}/tf.py
RENAMED
|
File without changes
|