Allow tests to run in parallel - #2296
Conversation
|
610c79e to
ec96b1a
Compare
|
|
@jan-cerny can I get a review on this? |
|
Rebased on latest main. |
|
matusmarhefka
left a comment
There was a problem hiding this comment.
Nice improvement, before:
Total Test time (real) = 425.16 sec
After:
Total Test time (real) = 172.90 sec
Once we merge this, consider updating https://src.fedoraproject.org/tests/openscap/blob/main/f/Sanity/smoke-test/runtest.sh#_124 as well to benefit from tests parallelization too.
| add_oscap_test("openscap_2289_regression.sh") | ||
| add_oscap_test("test_null_ptr_regression.sh") | ||
|
|
||
| set_tests_properties( |
There was a problem hiding this comment.
This block has different indent compared to the next one (6-space vs 5-space).
| add_oscap_test("test_probes_rpminfo.sh" LABELS linux linux_only) | ||
| add_oscap_test("test_probes_rpminfo_offline.sh" LABELS linux linux_only) | ||
|
|
||
| set_tests_properties( |
There was a problem hiding this comment.
Minor inconsistency, previous block uses tabs for indent.
| add_oscap_test("test_probes_rpmverify_not_equals_operation.sh" LABELS linux linux_only) | ||
| add_oscap_test("test_probes_rpmverify_not_equals_operation_offline.sh" LABELS linux linux_only) | ||
|
|
||
| set_tests_properties( |
There was a problem hiding this comment.
Previous block in this file uses tabs for indent.
| add_oscap_test("test_probes_rpmverifyfile_older.sh" LABELS linux linux_only) | ||
| add_oscap_test("test_probes_rpmverifyfile_offline.sh" LABELS linux linux_only) | ||
|
|
||
| set_tests_properties( |
There was a problem hiding this comment.
Previous block in this file uses tabs for indent.
| add_oscap_test("test_probes_rpmverifypackage.sh" LABELS linux linux_only) | ||
| add_oscap_test("test_probes_rpmverifypackage_offline.sh" LABELS linux linux_only) | ||
|
|
||
| set_tests_properties( |
There was a problem hiding this comment.
Previous block in this file uses tabs for indent.
| cp "${srcdir}/openshift-logging.yaml" /tmp | ||
|
|
||
| local YAML_FILE="/tmp/openshift-logging.yaml" | ||
| local YAML_FILE="/tmp/openshift-logging_key.yaml" |
There was a problem hiding this comment.
Why the name change? Previous cp command copies openshift-logging.yaml into /tmp, not openshift-logging_key.yaml. Also the $DF file (test_probes_yamlfilecontent_key.xml) references openshift-logging.yaml.
I think you also wanted to actually modify the previous copy command so it copies the file into tmp under this different name right? Otherwise tests/probes/yamlfilecontent/CMakeLists.txt would also need to be updated to lock /tmp/openshift-logging.yaml as it is used by the test_probes_yamlfilecontent_array.sh script too.
There was a problem hiding this comment.
There is some conflicting file name here, I updated the new file name.
So that we run tests in parallel
If you had "OpenSCAP" in your path to the OpenSCAP repo it would cause issues
|



Significantly speed up the tests if ran with
-j. See each commit for details. We have room for additional speed up if we can removeRESOURCE_LOCKgroups.Review hints
ctest -j$(nproc)a few times.