Skip to content

Commit 62174ae

Browse files
Fix execute_command_line unit test (#363)
execute_command_line() implementation in flang changed not to hard-fail for regular non-zero status codes returned by called commands. Related PR llvm/llvm-project#184285
1 parent b67c019 commit 62174ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Fortran/UnitTests/execute_command_line/execute_command_line.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@
5050
msg = ''
5151
call execute_command_line("notthere", exitstat=i, cmdstat=j, cmdmsg=msg)
5252
if (j /= 5 .or. msg /= "Command not found with exit code: 127." ) STOP 1
53+
msg = ''
5354
call execute_command_line("cat GeneralErrorCommand", exitstat=i, cmdstat=j, cmdmsg=msg)
54-
if (j /= 3 .or. msg /= "Command line execution failed with exit code: 1." ) STOP 2
55+
if (j /= 0 .or. msg /= "" ) STOP 2
5556
msg = "remaining buffer not modified XXXXXXXXXXXXXXXXXXX"
5657
call execute_command_line("touch NotExecutedCommandFile && chmod -x NotExecutedCommandFile && ./NotExecutedCommandFile", exitstat=i, cmdstat=j, cmdmsg=msg)
5758
if (j /= 4 .or. msg /= "Command cannot be executed with exit code: 126.XX" ) STOP 3

0 commit comments

Comments
 (0)