squidient 2.2.0__tar.gz → 2.4.0__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.
- {squidient-2.2.0 → squidient-2.4.0}/.gitignore +1 -0
- {squidient-2.2.0 → squidient-2.4.0}/PKG-INFO +1 -1
- {squidient-2.2.0 → squidient-2.4.0}/pyproject.toml +1 -1
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/builds/benchmarkbuilder.py +1 -3
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/builds/builder.py +50 -44
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/cli.py +22 -23
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/codecoverage/codecoverage.py +2 -3
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/codecoverage/gcovrcodecoverage.py +7 -7
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/codecoverage/intelcodecoverage.py +14 -18
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/connection/job.py +4 -5
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/git.py +2 -1
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/init.py +2 -1
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/monitor/monitor.py +26 -37
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/monitor/monitordb.py +4 -7
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/sqreport/squidientbasereport.py +3 -2
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/sqreport/squidientcasereport.py +4 -3
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/sqreport/squidientdetailedreport.py +6 -5
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/sqreport/squidientfullreport.py +2 -1
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/squidient.py +54 -54
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/squidientmonitor.py +22 -20
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/staging/staging.py +78 -105
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/systems/platform.py +2 -1
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/systems/queuetester.py +7 -7
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/terraform/terraform.py +16 -18
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/testing/benchmarktester.py +8 -15
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/testing/instance.py +3 -2
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/testing/test.py +2 -2
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/testing/tester.py +53 -50
- squidient-2.4.0/src/squidient/utils/message.py +157 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/utils/watchdog.py +7 -8
- squidient-2.2.0/.ci-cd/python-ci/README.md +0 -2
- squidient-2.2.0/src/squidient/utils/message.py +0 -64
- {squidient-2.2.0 → squidient-2.4.0}/LICENSE.txt +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/README.md +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/__init__.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/builds/benchmarkbuild.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/builds/build.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/builds/executablebuild.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/builds/predefinedbuild.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/compare.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/comparewithdifftable.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/absolute.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/close.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/diff.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/l1norm.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/l1relative.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/l2norm.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/l2relative.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/linfnorm.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/linfrelative.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/power.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/relative.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/scalartolerance.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/tolerance.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compare/methods/vectortolerance.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/compilation/cmakeoptions.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/configure.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/connection/buildlock.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/connection/ssh.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/connection/sshconfigchecker.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/.squidient-initialized +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-alamak.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-chemint.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-clang.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-commdom.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-gnu.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-intel.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-mumps.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-nvhpc.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/alya-config/cmake-talp.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/benchmarks/benchmarks.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/builds/builds.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/builds/cc.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/builds/defaults.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/builds/predefined-old.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/builds/predefined.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/configurations/projects.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/configurations/systems.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/configurations/tests.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/email/report.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/icons/big.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/icons/small.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/index.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/.gitignore +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small/.gitignore +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small/t3.small/cloud-init-slurm-fedora.sh +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small/t3.small/t3.small.tf +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small/t3.small/terraform.tfvars +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/.gitignore +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/cloud-init-slurm-fedora.sh +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/replace-var.sh +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/t3.small.tf +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x2/t3.small/terraform.tfvars +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/.gitignore +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/cloud-init-slurm-fedora.sh +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/t3.small.tf +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/terraform/aws-ec2-t3.small-x3/t3.small/terraform.tfvars +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/version/version.json +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/bb.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/benchmarks.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/btest.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/btests.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/builds.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/cc-gcovr.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/cc-intel.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/files.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/canceled.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/created.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/failed.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/failed_black.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/failed_green.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/file_cloud.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/file_config.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/file_ko.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/file_ok.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/skipped.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/squidient_logo.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/success.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/success_black.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/timeout.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/tolerance.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/warning.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/warning_black.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/png/warning_green.png +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/canceled.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/created.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/failed.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/failed_black.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/failed_green.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/manual.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/running.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/skipped.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/success.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/success_black.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/warning.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/warning_black.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/img/svg/warning_green.svg +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/index.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/jquery.dynatable.css +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/jquery.dynatable.js +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/perf.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/test.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/tests.html +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/testsuite.css +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/data/web/testsuite.js +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/definitions.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/deployment/modulegenerator.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/reports/monitorreport.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/reports/report.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/sqreport/__init__.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/systems/partition.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/systems/qos.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/systems/reservation.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/systems/system.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/systems/systemmanager.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/testing/benchmarkinstance.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/testing/benchmarktest.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/testing/instancemerger.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/timers/__init__.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/timers/timer.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/utils/arguments.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/utils/lock.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/utils/log.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/utils/package.py +0 -0
- {squidient-2.2.0 → squidient-2.4.0}/src/squidient/utils/utils.py +0 -0
|
@@ -50,9 +50,7 @@ class BenchmarkBuilder(Builder):
|
|
|
50
50
|
db=self._db)
|
|
51
51
|
|
|
52
52
|
def build_report(self):
|
|
53
|
-
|
|
54
|
-
print("Building monitor build report")
|
|
55
|
-
print_line()
|
|
53
|
+
console.section("Building monitor build report")
|
|
56
54
|
report = {}
|
|
57
55
|
for b in self._builds:
|
|
58
56
|
self._builds[b].build_report()
|
|
@@ -27,6 +27,7 @@ import time
|
|
|
27
27
|
|
|
28
28
|
from ..definitions import *
|
|
29
29
|
from ..timers import Timer
|
|
30
|
+
from ..utils.message import LiveOutput, console
|
|
30
31
|
|
|
31
32
|
logger = logging.getLogger(logging_context)
|
|
32
33
|
|
|
@@ -53,6 +54,7 @@ class Builder:
|
|
|
53
54
|
self._report_dir = ""
|
|
54
55
|
self.set_report_dir()
|
|
55
56
|
self._p = ""
|
|
57
|
+
self._build_status_printed = False
|
|
56
58
|
|
|
57
59
|
def timer(self, name, local=True, system="", platform="", comment=""):
|
|
58
60
|
return Timer.scope(name, local=local, system=system, platform=platform, comment=comment)
|
|
@@ -122,9 +124,7 @@ class Builder:
|
|
|
122
124
|
def terminate_builds(self):
|
|
123
125
|
with self.timer("builds.wait", local=False):
|
|
124
126
|
finished = False
|
|
125
|
-
|
|
126
|
-
print("Waiting for builds to finish:")
|
|
127
|
-
print_line()
|
|
127
|
+
console.section("Waiting for builds to finish")
|
|
128
128
|
while not finished:
|
|
129
129
|
finished = self.check_builds()
|
|
130
130
|
return self.get_status()
|
|
@@ -145,14 +145,19 @@ class Builder:
|
|
|
145
145
|
def get_total(self):
|
|
146
146
|
return len(self._builds)
|
|
147
147
|
|
|
148
|
-
def next_valid_build(self,
|
|
149
|
-
|
|
148
|
+
def next_valid_build(self, show_progress=True, single_snapshot=None, stop_on_error=False):
|
|
149
|
+
display_status = show_progress
|
|
150
150
|
while len(self._pending_builds) == 0:
|
|
151
|
-
if self.check_builds(
|
|
151
|
+
if self.check_builds(
|
|
152
|
+
show_progress=display_status,
|
|
153
|
+
show_elapsed=display_status,
|
|
154
|
+
rewind=False,
|
|
155
|
+
single_snapshot=single_snapshot):
|
|
152
156
|
if self.get_failed() > 1 and stop_on_error:
|
|
153
157
|
return None
|
|
154
158
|
break
|
|
155
|
-
|
|
159
|
+
if single_snapshot is True:
|
|
160
|
+
display_status = False
|
|
156
161
|
build = None
|
|
157
162
|
for b in self._pending_builds:
|
|
158
163
|
build = b
|
|
@@ -185,9 +190,7 @@ class Builder:
|
|
|
185
190
|
|
|
186
191
|
def build_report(self):
|
|
187
192
|
with self.timer("builds.report"):
|
|
188
|
-
|
|
189
|
-
print("Building build report")
|
|
190
|
-
print_line()
|
|
193
|
+
console.section("Building build report")
|
|
191
194
|
report = {}
|
|
192
195
|
for b in self._builds:
|
|
193
196
|
if b in self._finished_builds:
|
|
@@ -209,11 +212,13 @@ class Builder:
|
|
|
209
212
|
status = self._builds[build].check_build_status()
|
|
210
213
|
return status
|
|
211
214
|
|
|
212
|
-
def check_builds(self,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
def check_builds(self, show_progress=True, show_elapsed=True, rewind=True, single_snapshot=None):
|
|
216
|
+
line_count = len(self._builds) + (1 if show_elapsed else 0)
|
|
217
|
+
live = LiveOutput(
|
|
218
|
+
line_count,
|
|
219
|
+
enabled=show_progress,
|
|
220
|
+
single_snapshot=single_snapshot if single_snapshot is not None else not rewind,
|
|
221
|
+
printed=self._build_status_printed)
|
|
217
222
|
check = True
|
|
218
223
|
time.sleep(1)
|
|
219
224
|
status = {}
|
|
@@ -234,7 +239,7 @@ class Builder:
|
|
|
234
239
|
status["status"] = "Success"
|
|
235
240
|
self._finished_builds[b] = True
|
|
236
241
|
self._pending_builds[b] = True
|
|
237
|
-
one_success = not
|
|
242
|
+
one_success = not rewind
|
|
238
243
|
else:
|
|
239
244
|
status["status"] = "Failed"
|
|
240
245
|
self._finished_builds[b] = False
|
|
@@ -242,18 +247,24 @@ class Builder:
|
|
|
242
247
|
else:
|
|
243
248
|
test = False
|
|
244
249
|
check = check and test
|
|
245
|
-
if
|
|
246
|
-
|
|
247
|
-
if
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
if live.should_print():
|
|
251
|
+
console.status(b, status["status"])
|
|
252
|
+
if live.should_print() and show_elapsed:
|
|
253
|
+
console.write("Elapsed time: {} minutes".format(int((time.time() - self._start_time) / 60)))
|
|
254
|
+
live.printed()
|
|
255
|
+
self._build_status_printed = True
|
|
256
|
+
elif live.should_print():
|
|
257
|
+
live.printed()
|
|
258
|
+
self._build_status_printed = True
|
|
259
|
+
if check:
|
|
260
|
+
self._build_status_printed = False
|
|
261
|
+
if (not check) and not one_success:
|
|
262
|
+
live.rewind()
|
|
251
263
|
time.sleep(1)
|
|
252
264
|
return check
|
|
253
265
|
|
|
254
266
|
def get_alya(self, fetch=True, force_https=False):
|
|
255
267
|
with self.timer("builds.get_alya", comment="fetch={}".format(fetch)):
|
|
256
|
-
jump()
|
|
257
268
|
self._alya_repository = Git(git_ssh=self._config["alyaGitRepository"]["ssh"],
|
|
258
269
|
git_https=self._config["alyaGitRepository"]["https"],
|
|
259
270
|
user=self._config["alyaGitRepository"]["user"],
|
|
@@ -262,18 +273,16 @@ class Builder:
|
|
|
262
273
|
password=self._password,
|
|
263
274
|
force_https=force_https)
|
|
264
275
|
if fetch:
|
|
265
|
-
|
|
276
|
+
console.section("Cloning or updating the alya git repository")
|
|
266
277
|
self._alya_repository.clone_or_update_tests()
|
|
267
|
-
print_line()
|
|
268
278
|
self._revision = self._alya_repository.revision_short()
|
|
269
279
|
self._revision_long = self._alya_repository.revision_long()
|
|
270
280
|
return self._alya_repository
|
|
271
281
|
|
|
272
282
|
def download_alamak(self, user="", token=""):
|
|
273
283
|
with self.timer("builds.download_alamak"):
|
|
274
|
-
jump()
|
|
275
284
|
if self._config["alamak"]["enable"]:
|
|
276
|
-
|
|
285
|
+
console.section("Cloning alamak")
|
|
277
286
|
self.cd_push(self._config["alamak"]["path"])
|
|
278
287
|
critical_command("./alamak.sh --clean")
|
|
279
288
|
if self._config["alamak"]["revision"] is not None:
|
|
@@ -288,34 +297,32 @@ class Builder:
|
|
|
288
297
|
try:
|
|
289
298
|
critical_command(alamak_command, silent=True)
|
|
290
299
|
except:
|
|
291
|
-
|
|
300
|
+
console.error("The cloning of alamak has failed")
|
|
292
301
|
command("./alamak.sh --clean")
|
|
293
|
-
|
|
302
|
+
console.write(command(alamak_command, silent=True).stdout)
|
|
294
303
|
raise Exception
|
|
295
304
|
self.cd_pop()
|
|
296
|
-
print_line()
|
|
297
305
|
|
|
298
306
|
def get_alya_repository(self):
|
|
299
307
|
return self._alya_repository
|
|
300
308
|
|
|
301
309
|
def send_alya(self):
|
|
302
310
|
with self.timer("builds.send_alya", local=False):
|
|
303
|
-
|
|
311
|
+
console.section("Uploading alya")
|
|
304
312
|
for system in self._systemManager.get_systems():
|
|
305
313
|
with self.timer("builds.send_alya.system", local=False, system=system):
|
|
306
|
-
|
|
307
|
-
|
|
314
|
+
console.step("System " + system)
|
|
315
|
+
console.step("Cleaning the remote build directory")
|
|
308
316
|
self._ssh.rmdir(system=system, path=remote_bin_dir, server_path=True)
|
|
309
317
|
if self._config["clean"]:
|
|
310
318
|
self._ssh.rmdir(system=system, path=remote_build_dir, server_path=True)
|
|
311
319
|
self._ssh.rmdir(system=system, path=remote_cc_dir, server_path=True)
|
|
312
|
-
|
|
320
|
+
console.step("Creating the remote build directory infrastructure")
|
|
313
321
|
self._ssh.mkdir(system=system, path=remote_bin_dir, server_path=True)
|
|
314
322
|
self._ssh.mkdir(system=system, path=remote_build_dir, server_path=True)
|
|
315
323
|
self._ssh.mkdir(system=system, path=remote_cc_dir, server_path=True)
|
|
316
|
-
|
|
324
|
+
console.step("Uploading alya source tree")
|
|
317
325
|
self._ssh.rsync_send(system=system, local=alya_dir, options="--exclude .git/", delete=True, server_path=True, critical=True)
|
|
318
|
-
print_line()
|
|
319
326
|
|
|
320
327
|
def create_build(self, build):
|
|
321
328
|
return ExecutableBuild(systemManager=self._systemManager, hash=self._hash, build_id=build, job=self._job, ssh=self._ssh,
|
|
@@ -323,14 +330,13 @@ class Builder:
|
|
|
323
330
|
|
|
324
331
|
def init_build(self, build):
|
|
325
332
|
with self.timer("builds.prepare_build", comment=build):
|
|
326
|
-
|
|
327
|
-
print("Build: " + build)
|
|
333
|
+
console.section("Preparing build " + build)
|
|
328
334
|
b = self.create_build(build)
|
|
329
|
-
|
|
335
|
+
console.step("Generating alya configuration file")
|
|
330
336
|
b.generate_configuration()
|
|
331
|
-
|
|
337
|
+
console.step("Generating job file")
|
|
332
338
|
b.generate_job()
|
|
333
|
-
|
|
339
|
+
console.step("Uploading files")
|
|
334
340
|
with self.timer("builds.prepare_build.upload", local=False, system=b.get_system(), platform=b.get_platform(), comment=build):
|
|
335
341
|
b.send_files()
|
|
336
342
|
return b
|
|
@@ -338,12 +344,12 @@ class Builder:
|
|
|
338
344
|
def run_build(self, b):
|
|
339
345
|
with self.timer("builds.submit_job", local=False, system=b.get_system(), platform=b.get_platform(), comment=b.get_build_id()):
|
|
340
346
|
time.sleep(5)
|
|
341
|
-
|
|
347
|
+
console.step("Submitting job")
|
|
342
348
|
job_id = b.launch_job()
|
|
343
349
|
if job_id == -1:
|
|
344
|
-
|
|
350
|
+
console.error("Job submission has failed")
|
|
345
351
|
else:
|
|
346
|
-
|
|
352
|
+
console.success("Job id: " + str(job_id))
|
|
347
353
|
|
|
348
354
|
def get_builds(self):
|
|
349
355
|
return self._builds
|
|
@@ -21,7 +21,7 @@ import sys
|
|
|
21
21
|
|
|
22
22
|
from .configure import configure_help as chelp
|
|
23
23
|
from .init import copy_packaged_tree, init_squidient
|
|
24
|
-
from .utils.message import
|
|
24
|
+
from .utils.message import console
|
|
25
25
|
from .squidient import help as shelp
|
|
26
26
|
from .squidientmonitor import help as mhelp
|
|
27
27
|
from .configure import main as cmain
|
|
@@ -30,35 +30,34 @@ from .squidientmonitor import main as mmain
|
|
|
30
30
|
from .utils.package import check_latest_package_any_index
|
|
31
31
|
|
|
32
32
|
def help():
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
console.write("squidient [option]")
|
|
34
|
+
console.blank()
|
|
35
|
+
console.write("\tsquidient help Print this help")
|
|
36
|
+
console.blank()
|
|
37
|
+
console.write("\tInitialization options:")
|
|
38
|
+
console.write("\tsquidient init [directory] Initialize the directory")
|
|
39
|
+
console.blank()
|
|
40
|
+
console.write("\tConfiguration options:")
|
|
41
|
+
console.write("\tsquidient configure [options] Configure squidient")
|
|
42
42
|
chelp()
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
console.blank()
|
|
44
|
+
console.write("\tBuild and test options:")
|
|
45
|
+
console.write("\tsquidient run [options]")
|
|
46
46
|
shelp()
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
console.blank()
|
|
48
|
+
console.write("\tsquidient monitor [options]")
|
|
49
49
|
mhelp()
|
|
50
50
|
|
|
51
51
|
def main():
|
|
52
52
|
info = check_latest_package_any_index("squidient")
|
|
53
53
|
|
|
54
54
|
if not info["up_to_date"]:
|
|
55
|
-
|
|
56
|
-
f"
|
|
57
|
-
f"
|
|
55
|
+
console.warning(
|
|
56
|
+
f"squidient {info['installed']} is older than "
|
|
57
|
+
f"{info['latest']} on {info['latest_index']}."
|
|
58
58
|
)
|
|
59
|
-
print("Please update to the last version running python3 -m pip install --user -U squidient")
|
|
60
59
|
else:
|
|
61
|
-
|
|
60
|
+
console.success(
|
|
62
61
|
f"squidient {info['installed']} is up to date "
|
|
63
62
|
f"(checked: {info['checked']})"
|
|
64
63
|
)
|
|
@@ -91,10 +90,10 @@ def main():
|
|
|
91
90
|
return 1
|
|
92
91
|
|
|
93
92
|
except Exception as e:
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
console.error(str(e))
|
|
94
|
+
console.error("Exception")
|
|
96
95
|
return 1
|
|
97
96
|
|
|
98
97
|
|
|
99
98
|
if __name__ == "__main__":
|
|
100
|
-
sys.exit(main())
|
|
99
|
+
sys.exit(main())
|
|
@@ -92,13 +92,12 @@ class CodeCoverage(ABC):
|
|
|
92
92
|
pass
|
|
93
93
|
|
|
94
94
|
@abstractmethod
|
|
95
|
-
def postprocess(self,
|
|
95
|
+
def postprocess(self, show_details):
|
|
96
96
|
pass
|
|
97
97
|
|
|
98
98
|
def build_report(self):
|
|
99
99
|
with self.timer("code_coverage.report", comment=self._tool):
|
|
100
|
-
|
|
101
|
-
print_line()
|
|
100
|
+
console.section("Building code coverage report")
|
|
102
101
|
f = cc_report_dir + "/cc.json"
|
|
103
102
|
save_json(self._report, f)
|
|
104
103
|
json2js("cc", f)
|
|
@@ -35,7 +35,7 @@ def read_base_xml(filename):
|
|
|
35
35
|
|
|
36
36
|
def create_package_file(cobertura, package, destination_path):
|
|
37
37
|
filename = "cobertura-{}.xml".format(package.attrib['name'])
|
|
38
|
-
|
|
38
|
+
console.step("Creating package file {}".format(filename))
|
|
39
39
|
xml_to_write = copy.deepcopy(cobertura)
|
|
40
40
|
packages_node = xml_to_write.find('packages')
|
|
41
41
|
|
|
@@ -64,17 +64,17 @@ class GcovrCodeCoverage(CodeCoverage):
|
|
|
64
64
|
|
|
65
65
|
def process(self):
|
|
66
66
|
with self.platform_timer("code_coverage.process", comment=self._tool):
|
|
67
|
-
|
|
67
|
+
console.step("Generating code coverage file")
|
|
68
68
|
if not self._ssh.ssh(system=self._system, platform=self._platform,
|
|
69
69
|
cmd=self.gcovr(),
|
|
70
70
|
server_path=True, path=remote_cc_dir):
|
|
71
71
|
return False
|
|
72
|
-
|
|
72
|
+
console.step("Generating cobertura report")
|
|
73
73
|
if not self._ssh.ssh(system=self._system, platform=self._platform,
|
|
74
74
|
cmd=self.cobertura(),
|
|
75
75
|
server_path=True, path=remote_cc_dir):
|
|
76
76
|
return False
|
|
77
|
-
|
|
77
|
+
console.step("Generating detailed html report")
|
|
78
78
|
if not self._ssh.ssh(system=self._system, platform=self._platform,
|
|
79
79
|
cmd=self.html(),
|
|
80
80
|
server_path=True, path=remote_cc_dir):
|
|
@@ -107,11 +107,11 @@ class GcovrCodeCoverage(CodeCoverage):
|
|
|
107
107
|
server_path=True, critical=True):
|
|
108
108
|
raise Exception
|
|
109
109
|
|
|
110
|
-
def postprocess(self,
|
|
110
|
+
def postprocess(self, show_details):
|
|
111
111
|
with self.timer("code_coverage.postprocess", comment=self._tool):
|
|
112
|
-
|
|
112
|
+
console.step("Computing code coverage")
|
|
113
113
|
self.cc_finding()
|
|
114
|
-
|
|
114
|
+
console.step("Splitting cobertura files")
|
|
115
115
|
self.cobertura_split()
|
|
116
116
|
|
|
117
117
|
def cc_finding(self):
|
|
@@ -105,17 +105,13 @@ class IntelCodeCoverage(CodeCoverage):
|
|
|
105
105
|
|
|
106
106
|
def process(self):
|
|
107
107
|
with self.platform_timer("code_coverage.process", comment=self._tool):
|
|
108
|
-
|
|
108
|
+
console.step("Merging code coverage files")
|
|
109
109
|
if not self.merge():
|
|
110
|
-
|
|
111
|
-
print("\tMerging has failed!")
|
|
112
|
-
print_line()
|
|
110
|
+
console.error("Merging has failed")
|
|
113
111
|
return False
|
|
114
|
-
|
|
112
|
+
console.step("Generating code coverage html files")
|
|
115
113
|
if not self.codecov():
|
|
116
|
-
|
|
117
|
-
print("\tCode coverage has failed!")
|
|
118
|
-
print_line()
|
|
114
|
+
console.error("Code coverage has failed")
|
|
119
115
|
return False
|
|
120
116
|
return True
|
|
121
117
|
|
|
@@ -160,14 +156,14 @@ class IntelCodeCoverage(CodeCoverage):
|
|
|
160
156
|
local=cc_report_dir, delete=True, server_path=True, critical=True):
|
|
161
157
|
raise Exception
|
|
162
158
|
|
|
163
|
-
def postprocess(self,
|
|
159
|
+
def postprocess(self, show_details):
|
|
164
160
|
with self.timer("code_coverage.postprocess", comment=self._tool):
|
|
165
|
-
|
|
161
|
+
console.step("Setting up input file list")
|
|
166
162
|
self.set_html_files()
|
|
167
|
-
|
|
163
|
+
console.step("Building code coverage summary")
|
|
168
164
|
self.summary()
|
|
169
|
-
self.details(True,
|
|
170
|
-
self.details(False,
|
|
165
|
+
self.details(True, show_details=show_details)
|
|
166
|
+
self.details(False, show_details=show_details)
|
|
171
167
|
|
|
172
168
|
def set_html_files(self):
|
|
173
169
|
files = []
|
|
@@ -196,13 +192,13 @@ class IntelCodeCoverage(CodeCoverage):
|
|
|
196
192
|
d.append(c)
|
|
197
193
|
self._report["summary"] = d
|
|
198
194
|
|
|
199
|
-
def details(self, covered,
|
|
195
|
+
def details(self, covered, show_details=True):
|
|
200
196
|
with self.timer("code_coverage.intel.details", comment="covered={}".format(covered)):
|
|
201
197
|
if covered:
|
|
202
|
-
|
|
198
|
+
console.step("Building code coverage details for covered files")
|
|
203
199
|
input = self._covered
|
|
204
200
|
else:
|
|
205
|
-
|
|
201
|
+
console.step("Building code coverage details for uncovered files")
|
|
206
202
|
input = self._uncovered
|
|
207
203
|
|
|
208
204
|
rows = _source_rows(input)
|
|
@@ -213,8 +209,8 @@ class IntelCodeCoverage(CodeCoverage):
|
|
|
213
209
|
if rows[i]["file"] == "":
|
|
214
210
|
continue
|
|
215
211
|
f["name"] = rows[i]["file"]
|
|
216
|
-
if
|
|
217
|
-
|
|
212
|
+
if show_details:
|
|
213
|
+
console.step("File " + f["name"])
|
|
218
214
|
path = rows[i]["path"].split("alya/", 1)[1]
|
|
219
215
|
f["path"] = path
|
|
220
216
|
realPath = self.alya_realpath(path)
|
|
@@ -110,7 +110,7 @@ class JobThread (threading.Thread):
|
|
|
110
110
|
#job_number = int(self._ssh.ssh("squeue | wc -l", system=self._system, platform=self._platform).stdout.strip()) - 1
|
|
111
111
|
job_number = max(len(self._ssh.ssh("squeue", system=self._system, platform=self._platform).stdout.split("\n")) - 2, 0)
|
|
112
112
|
except:
|
|
113
|
-
|
|
113
|
+
console.warning("Cannot determine running jobs")
|
|
114
114
|
logger.warning("Cannot determine job number")
|
|
115
115
|
logger.debug("Job number of " + self._platform + " retrieved with squeue: " + str(job_number))
|
|
116
116
|
return job_number
|
|
@@ -152,7 +152,7 @@ class Job:
|
|
|
152
152
|
dep = ""
|
|
153
153
|
if key_lock != "":
|
|
154
154
|
if asynchronous:
|
|
155
|
-
|
|
155
|
+
console.error("You cannot launch an asynchronous job with a dependency")
|
|
156
156
|
raise Exception
|
|
157
157
|
lock_id = self._build_lock.get_lock(key_lock)
|
|
158
158
|
if lock_id != -1:
|
|
@@ -162,7 +162,7 @@ class Job:
|
|
|
162
162
|
self._output_queues[system][platform] = queue.Queue()
|
|
163
163
|
self._job_threads[system][platform] = []
|
|
164
164
|
if self._thread_number[system][platform] < 1:
|
|
165
|
-
|
|
165
|
+
console.error("Thread number must be greater than 0")
|
|
166
166
|
raise Exception
|
|
167
167
|
for i in range(self._thread_number[system][platform]):
|
|
168
168
|
self._job_threads[system][platform].append(JobThread(self._ssh, system, platform,
|
|
@@ -287,12 +287,11 @@ class Job:
|
|
|
287
287
|
return job_id
|
|
288
288
|
|
|
289
289
|
def kill_all(self):
|
|
290
|
-
jump()
|
|
291
290
|
for system in self._job_threads:
|
|
292
291
|
for platform in self._job_threads[system]:
|
|
293
292
|
self._ssh.ssh(cmd="scancel --name=" + jtitle + self._hash, system=system, platform=platform)
|
|
294
293
|
self._jobs.clear()
|
|
295
|
-
|
|
294
|
+
console.blank()
|
|
296
295
|
|
|
297
296
|
def job_list(self, force=False):
|
|
298
297
|
timet = time.time()
|
|
@@ -24,6 +24,7 @@ import os.path
|
|
|
24
24
|
import shutil
|
|
25
25
|
|
|
26
26
|
from .utils.utils import *
|
|
27
|
+
from .utils.message import console
|
|
27
28
|
import getpass
|
|
28
29
|
|
|
29
30
|
logger = logging.getLogger(logging_context)
|
|
@@ -255,7 +256,7 @@ class Git:
|
|
|
255
256
|
if not self.clone_https():
|
|
256
257
|
logger.info("HTTPS clone failed")
|
|
257
258
|
raise RuntimeError("Git repository cannot be cloned")
|
|
258
|
-
|
|
259
|
+
console.step("Switching git directory to branch " + self._branch)
|
|
259
260
|
if not self.branch():
|
|
260
261
|
raise RuntimeError("Cannot switch to " + self._branch + " and rebase it!")
|
|
261
262
|
|
|
@@ -5,6 +5,7 @@ import shutil
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import Union
|
|
7
7
|
import squidient
|
|
8
|
+
from .utils.message import console
|
|
8
9
|
|
|
9
10
|
try:
|
|
10
11
|
from importlib.resources import files as ir_files
|
|
@@ -83,4 +84,4 @@ def init_squidient(dist_dir: str=".") -> None:
|
|
|
83
84
|
|
|
84
85
|
if __name__ == "__main__":
|
|
85
86
|
init_squidient()
|
|
86
|
-
|
|
87
|
+
console.success("Copied squidient/data/* into current directory")
|