| ... | @@ -1853,9 +1853,16 @@ fn buildOutputType( | ... | @@ -1853,9 +1853,16 @@ fn buildOutputType( |
| 1853 | else => unreachable, | 1853 | else => unreachable, |
| 1854 | } | 1854 | } |
| 1855 | } | 1855 | } |
| 1856 | try argv.appendSlice(&[_][]const u8{ | 1856 | // when testing pass the zig_exe_path to argv |
| 1857 | exe_path, self_exe_path, | 1857 | if (arg_mode == .zig_test) |
| 1858 | }); | 1858 | try argv.appendSlice(&[_][]const u8{ |
| | 1859 | exe_path, self_exe_path, |
| | 1860 | }) |
| | 1861 | // when running just pass the current exe |
| | 1862 | else |
| | 1863 | try argv.appendSlice(&[_][]const u8{ |
| | 1864 | exe_path, |
| | 1865 | }); |
| 1859 | } else { | 1866 | } else { |
| 1860 | for (test_exec_args.items) |arg| { | 1867 | for (test_exec_args.items) |arg| { |
| 1861 | if (arg) |a| { | 1868 | if (arg) |a| { |