45
45
import glob
46
46
47
47
is_enabled = 'ENABLE_STANDALONE_UNITTESTS' in os .environ and os .environ ['ENABLE_STANDALONE_UNITTESTS' ] == "true"
48
- MVN = shutil .which ('mvn' )
48
+ MVN_CMD = [shutil .which ('mvn' ), '-ntp' , '-e' ] # No download progress bar, always show traces
49
+ if 'MAVEN_REPO_OVERRIDE' in os .environ :
50
+ MVN_CMD += ['-Dmaven.repo.remote=' + os .environ ['MAVEN_REPO_OVERRIDE' ]]
49
51
50
52
def get_executable (file ):
51
53
if os .path .isfile (file ):
@@ -126,7 +128,7 @@ def test_polyglot_app():
126
128
print (p .stderr .decode (errors = 'backslashreplace' ))
127
129
assert "Creating polyglot java python application in directory " + target_dir in out
128
130
129
- cmd = [ MVN , "package" , "-Pnative" ]
131
+ cmd = MVN_CMD + [ "package" , "-Pnative" ]
130
132
p = subprocess .run (cmd , cwd = target_dir , env = env , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
131
133
out = p .stdout .decode (errors = 'backslashreplace' )
132
134
print (out )
@@ -140,7 +142,7 @@ def test_polyglot_app():
140
142
print (p .stderr .decode (errors = 'backslashreplace' ))
141
143
assert out .endswith ("hello java\n " )
142
144
143
- cmd = [ MVN , "package" , "-Pjar" ]
145
+ cmd = MVN_CMD + [ "package" , "-Pjar" ]
144
146
p = subprocess .run (cmd , cwd = target_dir , env = env , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
145
147
out = p .stdout .decode (errors = 'backslashreplace' )
146
148
print (out )
0 commit comments