Skip to content

Commit fffe8cf

Browse files
authored
remove common moduel from script
1 parent f4bb5f6 commit fffe8cf

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
import subprocess
3+
4+
current_dir = os.getcwd()
5+
6+
RUNNING_STATUS = "running"
7+
#if open_edge_Repo true
8+
repo_path = current_dir + "/../../../../../"
9+
10+
hostIP = subprocess.check_output("ip route get 1 | awk '{print $7}'|head -1", shell=True)
11+
hostip = str(str(hostIP, 'utf-8').split("\n")[0])

microservices/dlstreamer-pipeline-server/tests/scripts/common_library/dlsps_utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0
55
#
66

7-
import os, sys, time, json, yaml, subprocess, os.path, requests,common
7+
import os, sys, time, json, yaml, subprocess, os.path, requests
88
from collections import OrderedDict
99

1010
current_dir = os.path.abspath(os.path.dirname(__file__))
@@ -242,13 +242,13 @@ def search_element(self, logFile, keyword):
242242
return False
243243

244244
def generate_repo_dlsps(self):
245-
os.chdir(common.repo_path)
245+
os.chdir(repo_path)
246246
if self.is_open_edge:
247247
repo_url = "https://github.com/open-edge-platform/edge-ai-libraries/"
248-
destination_dir = os.path.join(common.repo_path, "edge-ai-libraries")
248+
destination_dir = os.path.join(repo_path, "edge-ai-libraries")
249249
else:
250250
repo_url = "https://github.com/intel-innersource/applications.services.esh.dlstreamer-pipeline-server ./dlstreamer-pipeline-server"
251-
destination_dir = os.path.join(common.repo_path, "dlstreamer-pipeline-server")
251+
destination_dir = os.path.join(repo_path, "dlstreamer-pipeline-server")
252252
print(f"Cloning repository: {repo_url}")
253253
print(f"Destination directory: {destination_dir}")
254254

@@ -263,10 +263,10 @@ def generate_repo_dlsps(self):
263263
print("Branch checked out.")
264264

265265
files_to_copy = [
266-
{"source": f"{common.repo_path}/automation_tests/resources/videos/video_001.avi", "destination": f"{self.dlsps_path}/../resources/videos/video_001.avi"},
267-
{"source": f"{common.repo_path}/automation_tests/resources/videos/video@001.avi", "destination": f"{self.dlsps_path}/../resources/videos/video@001.avi"},
268-
{"source": f"{common.repo_path}/automation_tests/resources/images/classroom.png", "destination": f"{self.dlsps_path}/../resources/images/classroom.png"},
269-
{"source": f"{common.repo_path}/automation_tests/resources/videos/road_barrier_1920_1080.avi", "destination": f"{self.dlsps_path}/../resources/videos/road_barrier_1920_1080.avi"}
266+
{"source": f"{repo_path}/automation_tests/resources/videos/video_001.avi", "destination": f"{self.dlsps_path}/../resources/videos/video_001.avi"},
267+
{"source": f"{repo_path}/automation_tests/resources/videos/video@001.avi", "destination": f"{self.dlsps_path}/../resources/videos/video@001.avi"},
268+
{"source": f"{repo_path}/automation_tests/resources/images/classroom.png", "destination": f"{self.dlsps_path}/../resources/images/classroom.png"},
269+
{"source": f"{repo_path}/automation_tests/resources/videos/road_barrier_1920_1080.avi", "destination": f"{self.dlsps_path}/../resources/videos/road_barrier_1920_1080.avi"}
270270
]
271271
print('\n********** Install dlsps Mode **********')
272272
if not os.path.isdir(self.dlsps_path):

0 commit comments

Comments
 (0)