ScriptCollection 4.2.85__py3-none-any.whl → 4.2.87__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.
- ScriptCollection/ScriptCollectionCore.py +1 -1
- ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py +18 -15
- {scriptcollection-4.2.85.dist-info → scriptcollection-4.2.87.dist-info}/METADATA +1 -1
- {scriptcollection-4.2.85.dist-info → scriptcollection-4.2.87.dist-info}/RECORD +7 -7
- {scriptcollection-4.2.85.dist-info → scriptcollection-4.2.87.dist-info}/WHEEL +0 -0
- {scriptcollection-4.2.85.dist-info → scriptcollection-4.2.87.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.2.85.dist-info → scriptcollection-4.2.87.dist-info}/top_level.txt +0 -0
|
@@ -467,25 +467,21 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
467
467
|
GeneralUtilities.ensure_directory_exists(temp_folder)
|
|
468
468
|
runsettings_file = "runsettings.xml"
|
|
469
469
|
codeunit_folder = f"{repository_folder}/{codeunit_name}"
|
|
470
|
-
args: list[str] = ["test", ".", "-c", dotnet_build_configuration]
|
|
471
|
-
if os.path.isfile(os.path.join(codeunit_folder, runsettings_file)):
|
|
472
|
-
args += ["--settings", runsettings_file]
|
|
473
|
-
args += ["--collect:XPlat Code Coverage", "--results-directory", temp_folder]
|
|
474
|
-
self._protected_sc.run_program_argsasarray("dotnet", args, codeunit_folder, print_live_output=self.get_verbosity()==LogLevel.Debug, timeoutInSeconds=60*20)
|
|
475
|
-
# coverlet.collector writes the report to <temp_folder>/<run-guid>/coverage.cobertura.xml
|
|
476
|
-
generated_coverage_file: str = None
|
|
477
|
-
for root_dir, _, files in os.walk(temp_folder):
|
|
478
|
-
for f in files:
|
|
479
|
-
if f == "coverage.cobertura.xml":
|
|
480
|
-
generated_coverage_file = os.path.join(root_dir, f)
|
|
481
|
-
break
|
|
482
|
-
if generated_coverage_file is not None:
|
|
483
|
-
break
|
|
484
|
-
GeneralUtilities.assert_condition(generated_coverage_file is not None, f"Coverage file 'coverage.cobertura.xml' was not found under '{temp_folder}'.")
|
|
485
470
|
GeneralUtilities.ensure_directory_exists(coverage_file_folder)
|
|
486
471
|
target_file = os.path.join(coverage_file_folder, "TestCoverage.xml")
|
|
487
472
|
GeneralUtilities.ensure_file_does_not_exist(target_file)
|
|
473
|
+
|
|
474
|
+
args: list[str] = ["test", f"{codeunit_name}.sln", "-c", dotnet_build_configuration]
|
|
475
|
+
if os.path.isfile(os.path.join(codeunit_folder, runsettings_file)):
|
|
476
|
+
args += ["--settings", runsettings_file]
|
|
477
|
+
args += ["--results-directory","./TestResults"]
|
|
478
|
+
program_output=self._protected_sc.run_program_argsasarray("dotnet", args, codeunit_folder, print_live_output=self.get_verbosity()==LogLevel.Debug, timeoutInSeconds=60*20)
|
|
479
|
+
output_lines=program_output[1].split("\n")
|
|
480
|
+
output_lines=[line for line in output_lines if GeneralUtilities.string_has_content(line)]
|
|
481
|
+
generated_coverage_file: str = output_lines[-1].strip()#the cobertura file is printed in the end of the output by the xplat collector
|
|
482
|
+
GeneralUtilities.assert_file_exists(generated_coverage_file)
|
|
488
483
|
shutil.copyfile(generated_coverage_file, target_file)
|
|
484
|
+
|
|
489
485
|
GeneralUtilities.ensure_directory_does_not_exist(temp_folder)
|
|
490
486
|
self.__remove_unrelated_package_from_testcoverage_file(target_file, codeunit_name)
|
|
491
487
|
root: etree._ElementTree = etree.parse(target_file)
|
|
@@ -512,6 +508,13 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
512
508
|
result = etree.tostring(root).decode("utf-8")
|
|
513
509
|
GeneralUtilities.write_text_to_file(file, result)
|
|
514
510
|
|
|
511
|
+
@GeneralUtilities.check_arguments
|
|
512
|
+
def __coverage_file_contains_sources_and_packages(self, file: str) -> bool:
|
|
513
|
+
root: etree._ElementTree = etree.parse(file)
|
|
514
|
+
sources = root.xpath("//coverage/sources/source/text()")
|
|
515
|
+
packages = root.xpath("//coverage/packages/package")
|
|
516
|
+
return len(sources) > 0 and len(packages) > 0
|
|
517
|
+
|
|
515
518
|
@GeneralUtilities.check_arguments
|
|
516
519
|
def __standardized_tasks_run_testcases_for_dotnet_project_helper(self, source: str, codeunit_folder: str, match: re.Match) -> str:
|
|
517
520
|
filename = match.group(1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.87
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
@@ -15,7 +15,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
15
15
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
|
16
16
|
ScriptCollection/ProgramRunnerSudo.py,sha256=_khC3xuTdrPoLluBJZWfldltmmuKltABJPcbjZSFW-4,4835
|
|
17
17
|
ScriptCollection/SCLog.py,sha256=8TRy1LeYMsPOIuWUcnUNNbO5pd-cNBS-3cn-kdzP8FU,4768
|
|
18
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
18
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=ji6JXui4Q8_1PfTutF9ly29ucqzS5Hw7O0NccT2TgKQ,189103
|
|
19
19
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=o129UYDtLymCRjMZBP9Puaj19ueMHoNt6UTLspfnaRc,1758
|
|
21
21
|
ScriptCollection/OCIImages/OCIImageManager.py,sha256=2muW4hJ_a7EfavY3WVnafqZ0HC87RcZsoTuNvA3c0To,11175
|
|
@@ -45,7 +45,7 @@ ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
45
45
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
|
|
46
46
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
|
|
47
47
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
|
|
48
|
-
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=
|
|
48
|
+
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=fr7pN1WiFGIviggZ5Swl8LVHspqw87313e7O88xN06k,35734
|
|
49
49
|
ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
50
|
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=KAjyFyEjpkghsVPskfsHD68k4Z92gRCT_q6BXfikRwE,7660
|
|
51
51
|
ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -291,8 +291,8 @@ build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Python/TFCPS_Code
|
|
|
291
291
|
build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
292
292
|
build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
293
293
|
build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
294
|
-
scriptcollection-4.2.
|
|
295
|
-
scriptcollection-4.2.
|
|
296
|
-
scriptcollection-4.2.
|
|
297
|
-
scriptcollection-4.2.
|
|
298
|
-
scriptcollection-4.2.
|
|
294
|
+
scriptcollection-4.2.87.dist-info/METADATA,sha256=BKh1Bx4RBHZWUHMFcLyjFfxrEZnpzpdjmcC9IjTAvTU,7696
|
|
295
|
+
scriptcollection-4.2.87.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
296
|
+
scriptcollection-4.2.87.dist-info/entry_points.txt,sha256=27XwAJEcaMEc1be0Ec1vKHCbiU4Ziu8jKL-SqsrYOIQ,4680
|
|
297
|
+
scriptcollection-4.2.87.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
298
|
+
scriptcollection-4.2.87.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|