Skip to content

Commit 734124b

Browse files
Merge branch 'hotfix/container/tzdata_prompt'
2 parents d8294e0 + 0eeba2d commit 734124b

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

discopop_wizard/assets/profiling_container/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
FROM ubuntu:22.04
1010

11+
ENV TZ=Europe/Berlin
12+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
13+
1114
RUN apt-get update
1215
RUN apt-get install -y git cmake gcc libclang-11-dev clang-11 llvm-11 clang-tools-11 python3 python3-pip python3-tk wget file
1316

discopop_wizard/classes/ProfilingContainer.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ def copy_results_from_container(self, target_path: str, execution_view):
5353
"Data.xml",
5454
"loop_counter_output.txt",
5555
"reduction.txt",
56-
execution_view.execution_configuration.executable_name + "_dp_dep.txt",
57-
execution_view.execution_configuration.executable_name + "_dp.ll",
56+
execution_view.execution_configuration.value_dict["executable_name"] + "_dp_dep.txt",
57+
execution_view.execution_configuration.value_dict["executable_name"] + "_dp.ll",
5858
"patterns.txt",
5959
"patterns.json"
6060
]
@@ -66,10 +66,10 @@ def copy_results_from_container(self, target_path: str, execution_view):
6666
def analyze_project(self, execution_view):
6767
# copy project folder to container. Note: mounting would be nicer but requires restarting the container.
6868
# might be a nicer solution in the long run, especially for larger projects
69-
self.copy_project_folder_to_container(execution_view.execution_configuration.project_path)
69+
self.copy_project_folder_to_container(execution_view.execution_configuration.value_dict["project_path"])
7070

7171
# settings
72-
command = "/discopop/scripts/runDiscoPoP "
72+
command = "/discopop/build/scripts/runDiscoPoP "
7373
command += "--llvm-clang clang-11 "
7474
command += "--llvm-clang++ clang++-11 "
7575
command += "--llvm-ar llvm-ar-11 "
@@ -80,32 +80,32 @@ def analyze_project(self, execution_view):
8080
command += "--gllvm /software/go/bin "
8181
# execution configuration
8282
command += "--project /project "
83-
command += "--linker-flags \"" + execution_view.execution_configuration.linker_flags + "\" "
84-
command += "--executable-name \"" + execution_view.execution_configuration.executable_name + "\" "
85-
command += "--executable-arguments \"" + execution_view.execution_configuration.executable_arguments + "\" "
86-
command += "--make-flags \"" + execution_view.execution_configuration.make_flags + "\" "
87-
command += "--explorer-flags \"" + execution_view.execution_configuration.explorer_flags + "\" "
83+
command += "--linker-flags \"" + execution_view.execution_configuration.value_dict["linker_flags"] + "\" "
84+
command += "--executable-name \"" + execution_view.execution_configuration.value_dict["executable_name"] + "\" "
85+
command += "--executable-arguments \"" + execution_view.execution_configuration.value_dict["executable_arguments"] + "\" "
86+
command += "--make-flags \"" + execution_view.execution_configuration.value_dict["make_flags"] + "\" "
87+
command += "--explorer-flags \"" + execution_view.execution_configuration.value_dict["explorer_flags"] + "\" "
8888

8989
self.__execute_command("docker exec -it discopop_container " + command)
9090

9191
# copy results from container into working copy path
92-
if not os.path.exists(execution_view.execution_configuration.working_copy_path):
93-
os.mkdir(execution_view.execution_configuration.working_copy_path)
92+
if not os.path.exists(execution_view.execution_configuration.value_dict["working_copy_path"]):
93+
os.mkdir(execution_view.execution_configuration.value_dict["working_copy_path"])
9494

9595
# remove previous results
96-
self.remove_previous_results(execution_view.execution_configuration.working_copy_path)
96+
self.remove_previous_results(execution_view.execution_configuration.value_dict["working_copy_path"])
9797

9898
# copy results from container
99-
self.copy_results_from_container(execution_view.execution_configuration.working_copy_path, execution_view)
99+
self.copy_results_from_container(execution_view.execution_configuration.value_dict["working_copy_path"], execution_view)
100100

101101
# correct paths in generated FileMapping.txt
102102
self.__correct_file_mapping_paths(execution_view)
103103

104104
def __correct_file_mapping_paths(self, execution_view):
105-
file_mapping_path = os.path.join(execution_view.execution_configuration.working_copy_path, "FileMapping.txt")
105+
file_mapping_path = os.path.join(execution_view.execution_configuration.value_dict["working_copy_path"], "FileMapping.txt")
106106
with open(file_mapping_path, 'r') as file:
107107
contents = file.read()
108-
contents = contents.replace('/project/.discopop', execution_view.execution_configuration.project_path)
108+
contents = contents.replace('/project/.discopop', execution_view.execution_configuration.value_dict["project_path"])
109109
with open(file_mapping_path, 'w') as file:
110110
file.write(contents)
111111

0 commit comments

Comments
 (0)