File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ def __call__(
110
110
# have an empty line between stats of different Pants invocations
111
111
space = "\n \n " if Path (self .output_file ).exists () else ""
112
112
output_lines .append (
113
- f"{ space } { timestamp } Executing goals : { ',' . join ( context ._run_tracker . goals )} "
113
+ f"{ space } { timestamp } Command : { context .run_tracker . run_information (). get ( 'cmd_line' )} "
114
114
)
115
115
116
116
if self .log :
Original file line number Diff line number Diff line change @@ -51,26 +51,29 @@ def test_warn_if_no_histograms() -> None:
51
51
52
52
def test_writing_to_output_file () -> None :
53
53
with setup_tmpdir ({"src/py/app.py" : "print(0)\n " , "src/py/BUILD" : "python_sources()" }):
54
- argv = [
54
+ argv1 = [
55
55
"--backend-packages=['pants.backend.python']" ,
56
56
"--stats-log" ,
57
57
"--stats-memory-summary" ,
58
58
"--stats-output-file=stats.txt" ,
59
59
"roots" ,
60
60
]
61
- run_pants (argv ).assert_success ()
62
- argv = [
61
+ run_pants (argv1 ).assert_success ()
62
+ argv2 = [
63
63
"--backend-packages=['pants.backend.python']" ,
64
64
"--stats-log" ,
65
65
"--stats-memory-summary" ,
66
66
"--stats-output-file=stats.txt" ,
67
67
"list" ,
68
68
"::" ,
69
69
]
70
- run_pants (argv ).assert_success ()
70
+ run_pants (argv2 ).assert_success ()
71
71
output_file_contents = Path ("stats.txt" ).read_text ()
72
72
for item in ("Counters:" , "Memory summary" ):
73
73
assert output_file_contents .count (item ) == 2
74
74
75
75
for item in ("roots" , "list" ):
76
76
assert item in output_file_contents
77
+
78
+ for cmd in (argv1 , argv2 ):
79
+ assert " " .join (cmd ) in output_file_contents
You can’t perform that action at this time.
0 commit comments