1616CLEANUP = []
1717
1818def run (* args , ** kwargs ):
19- print ("##[command]" , * args )
19+ print ("##[command]" , end = "" )
20+ print (* args )
2021 with subprocess .Popen (
2122 args ,
2223 stdout = kwargs .pop ("stdout" , subprocess .PIPE ),
@@ -36,7 +37,7 @@ def main():
3637 if not install .get ("unmanaged" ):
3738 break
3839 else :
39- print ("[ERROR] No suitable (managed) runtime found." )
40+ print ("##[error] No suitable (managed) runtime found." )
4041 sys .exit (EXIT_SETUP_FAILED )
4142
4243 print ("Using" , install ["display-name" ], "from" , install ["prefix" ], "for test" )
@@ -46,12 +47,12 @@ def main():
4647
4748 site = Path (prefix ) / "Lib/site-packages"
4849 if not site .is_dir ():
49- print ("[ERROR] Selected runtime has no site-packages folder." )
50+ print ("##[error] Selected runtime has no site-packages folder." )
5051 sys .exit (EXIT_SETUP_FAILED )
5152
5253 eptest_src = Path (__file__ ).parent / "eptestpackage"
5354 if not eptest_src .is_dir ():
54- print ("[ERROR] eptestpackage is missing from test script location." )
55+ print ("##[error] eptestpackage is missing from test script location." )
5556 sys .exit (EXIT_SETUP_FAILED )
5657
5758 dist_info = site / "eptestpackage-1.0.dist-info"
@@ -69,7 +70,7 @@ def main():
6970 out , _ = run (exe , "-c" , "import eptestpackage; eptestpackage.main()" )
7071 if out .strip () != "eptestpackage:main" :
7172 print (out )
72- print ("[ERROR] Failed to import eptestpackage" )
73+ print ("##[error] Failed to import eptestpackage" )
7374 sys .exit (EXIT_SETUP_FAILED )
7475 print ("Confirmed eptestpackage is importable" )
7576
@@ -93,25 +94,25 @@ def main():
9394 if not (bin_dir / n ).is_file ():
9495 print ("--refresh log follows" )
9596 print (refresh_log )
96- print ("[ERROR] Did not create" , n )
97+ print ("##[error] Did not create" , n )
9798 sys .exit (EXIT_ALIAS_NOT_CREATED )
9899
99100 out , _ = run (bin_dir / "eptest.exe" )
101+ print (out )
100102 if out .strip () != "eptestpackage:main" :
101- print (out )
102- print ("[ERROR] eptest.exe alias failed" )
103+ print ("##[error]eptest.exe alias failed" )
103104 sys .exit (EXIT_ALIAS_INVALID )
104105
105106 out , _ = run (bin_dir / "eptestw.exe" )
107+ print (out )
106108 if out .strip () != "eptestpackage:mainw" :
107- print (out )
108- print ("[ERROR] eptestw.exe alias failed" )
109+ print ("##[error]eptestw.exe alias failed" )
109110 sys .exit (EXIT_ALIAS_INVALID )
110111
111112 out , _ = run (bin_dir / "eptest-refresh.exe" )
113+ print (out )
112114 if not out .strip ().endswith ("eptestpackage:do_refresh" ):
113- print (out )
114- print ("[ERROR] eptest-refresh.exe alias failed" )
115+ print ("##[error]eptest-refresh.exe alias failed" )
115116 sys .exit (EXIT_ALIAS_INVALID )
116117
117118
0 commit comments