@@ -100,14 +100,16 @@ stages:
100100 retryCountOnTaskFailure : 3
101101 inputs :
102102 scriptSource : ' inline'
103+ arguments : $(Build.SourcesDirectory)
103104 script : |
104105 import os
105106 import subprocess
106107 import shutil
107108 import sys
108109
109110 # Set environment variables and directories
110- bin_install_dir = os.path.realpath('bin')
111+ cwd = sys.argv[1]
112+ bin_install_dir = os.path.join(cwd, 'bin')
111113 os.environ['GOBIN'] = bin_install_dir
112114
113115 # Install the go-junit-report tool
@@ -121,7 +123,7 @@ stages:
121123 open(report_xml, 'a').close()
122124
123125 # Run make tools
124- subprocess.check_call(['make', 'tools'])
126+ subprocess.check_call(['make', 'tools'], shell=True )
125127
126128 # Function to run the test and capture output
127129 def run_test():
@@ -156,13 +158,15 @@ stages:
156158 displayName : " Generate Test Reporting"
157159 name : report
158160 inputs :
161+ arguments : $(Build.SourcesDirectory)
159162 scriptSource : ' inline'
160163 script : |
161164 import os
162165 import subprocess
163166
167+ cwd = sys.argv[1]
164168 # Define the necessary variables
165- bin_install_dir = os.path.realpath( 'bin')
169+ bin_install_dir = os.path.join(cwd, 'bin')
166170 report_dir = os.environ['REPORT_DIR']
167171 coverage_out = os.environ['COVERAGE_OUT']
168172 coverage_json = os.path.join(report_dir, 'windows-coverage.json')
0 commit comments