atex 0.2__py3-none-any.whl → 0.3__py3-none-any.whl

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.
@@ -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
+ ```
@@ -18,8 +18,8 @@ atex/util/dedent.py,sha256=uJYXKsEQECbJ58eqZFI5Bzlld0lD-C15NUcqRnvrLa4,603
18
18
  atex/util/lockable_class.py,sha256=hPuiPaUBUD-9bKLzaYYOrQ6JwLjk2zCzCkW8nm6SKpQ,1317
19
19
  atex/util/log.py,sha256=tQp4JZY1B4bca5CciscV4Q5ZsyKS2niOQb9_Vco_QOA,1776
20
20
  atex/util/subprocess.py,sha256=IWrwke4JylL6-jQoNMXnzKG4MVxbc9m6Q4wJVy4EBCM,1700
21
- atex-0.2.dist-info/METADATA,sha256=xzZ-TkX9ChvJLqy3as82k3Q5z4qAJsuVbsYYf1a_BIM,431
22
- atex-0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
- atex-0.2.dist-info/entry_points.txt,sha256=pLqJdcfeyQTgup2h6dWb6SvkHhtOl-W5Eg9zV8moK0o,39
24
- atex-0.2.dist-info/licenses/COPYING.txt,sha256=oEuj51jdmbXcCUy7pZ-KE0BNcJTR1okudRp5zQ0yWnU,670
25
- atex-0.2.dist-info/RECORD,,
21
+ atex-0.3.dist-info/METADATA,sha256=CByf7YiQHjuN76bDYEEHHWWCUwIDM161pDUHttcKv1o,5076
22
+ atex-0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ atex-0.3.dist-info/entry_points.txt,sha256=pLqJdcfeyQTgup2h6dWb6SvkHhtOl-W5Eg9zV8moK0o,39
24
+ atex-0.3.dist-info/licenses/COPYING.txt,sha256=oEuj51jdmbXcCUy7pZ-KE0BNcJTR1okudRp5zQ0yWnU,670
25
+ atex-0.3.dist-info/RECORD,,
@@ -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