| ... | @@ -972,10 +972,24 @@ pub fn addRunArtifact(b: *Build, exe: *Step.Compile) *Step.Run { | ... | @@ -972,10 +972,24 @@ pub fn addRunArtifact(b: *Build, exe: *Step.Compile) *Step.Run { |
| 972 | // Consider that this is declarative; the run step may not be run unless a user | 972 | // Consider that this is declarative; the run step may not be run unless a user |
| 973 | // option is supplied. | 973 | // option is supplied. |
| 974 | const run_step = Step.Run.create(b, b.fmt("run {s}", .{exe.name})); | 974 | const run_step = Step.Run.create(b, b.fmt("run {s}", .{exe.name})); |
| 975 | run_step.addArtifactArg(exe); | 975 | if (exe.kind == .@"test") { |
| | 976 | if (exe.exec_cmd_args) |exec_cmd_args| { |
| | 977 | for (exec_cmd_args) |cmd_arg| { |
| | 978 | if (cmd_arg) |arg| { |
| | 979 | run_step.addArg(arg); |
| | 980 | } else { |
| | 981 | run_step.addArtifactArg(exe); |
| | 982 | } |
| | 983 | } |
| | 984 | } else { |
| | 985 | run_step.addArtifactArg(exe); |
| | 986 | } |
| 976 | | 987 | |
| 977 | if (exe.kind == .@"test" and exe.test_server_mode) { | 988 | if (exe.test_server_mode) { |
| 978 | run_step.enableTestRunnerMode(); | 989 | run_step.enableTestRunnerMode(); |
| | 990 | } |
| | 991 | } else { |
| | 992 | run_step.addArtifactArg(exe); |
| 979 | } | 993 | } |
| 980 | | 994 | |
| 981 | return run_step; | 995 | return run_step; |