Skip to content

Commit

Permalink
Allow to redirect host for results
Browse files Browse the repository at this point in the history
  • Loading branch information
vmordan committed Nov 21, 2023
1 parent 3b12555 commit e608a90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
TAG_CVV_USER = "user"
TAG_CVV_PASS = "password"
TAG_CVV_HOST = "server"
TAG_CVV_HOST_REDIRECT = "redirect-server"

DEFAULT_CONFIG_COMMAND = "allmodconfig"
DEFAULT_ARCH = "x86_64"
Expand Down Expand Up @@ -274,11 +275,14 @@ def print_statistics(self):
cvv_pass = bridge_config[TAG_UPLOADER][TAG_CVV_PASS]
cvv_user = bridge_config[TAG_UPLOADER][TAG_CVV_USER]
cvv_host = bridge_config[TAG_UPLOADER][TAG_CVV_HOST]
additional_args = ""
if TAG_CVV_HOST_REDIRECT in bridge_config[TAG_UPLOADER]:
additional_args += f"--redirect-host {bridge_config[TAG_UPLOADER][TAG_CVV_HOST_REDIRECT]}"
credentials = self.__create_credentials(cvv_user, cvv_pass, cvv_host)
os.chdir(self.bridge_dir)
cvv_python_path = os.path.abspath(os.path.join(os.path.dirname(COMPARATOR_SCRIPT), os.path.pardir))
command = f"PYTHONPATH={cvv_python_path} {COMPARATOR_SCRIPT} {credentials} {self.parent_job_id} > " \
f"{RESULT_FILE}"
command = f"PYTHONPATH={cvv_python_path} {COMPARATOR_SCRIPT} {credentials} {additional_args} " \
f"{self.parent_job_id} > {RESULT_FILE}"
self.logger.debug(command)
self.command_caller(command)

Expand Down

0 comments on commit e608a90

Please sign in to comment.