Opened 22 months ago

#307 new defect

Windows launcher does not propagate exit code to caller

Reported by: Jan Vrany Owned by:
Priority: major Milestone:
Component: default Keywords:
Cc: Also affects CVS HEAD (eXept version): no

Description

When Smalltalk/X is executed on Windows via stx.bat the exist status is not propagated to the calling shell/command interpreter.

Steps to reproduce

On a Windows with MSYS2 installed, execute:

git clone https://github.com/shingarov/MachineArithmetic.git
wget https://github.com/Z3Prover/z3/releases/
download/z3-4.8.17/z3-4.8.17-x64-win.zip
unzip z3-4.8.17-x64-win.zip
copy z3-4.8.17-x64-win\bin\*.dll .
make test

Observed behavior

One test fails - you should see this in the output:

...
VERBOSE: MachineArithmetic-Tests.YurichevBookTest >> #testXKCD287_int
VERBOSE: MachineArithmetic... >> testXKCD287_int      : FW...ERROR
...

This is okay (not a launcher problem), but then it prints:

VERBOSE: MachineArithmetic-Tests.Z3CAPITest >> #testITE
VERBOSE: MachineArithmetic... >> testITE              : FW...OK
VERBOSE: MachineArithmetic-Tests.Z3CAPITest >> #testNumeral
VERBOSE: MachineArithmetic... >> testNumeral          : FW...OK
VERBOSE: MachineArithmetic-Tests.Z3CAPITest >> #testProve1
VERBOSE: MachineArithmetic... >> testProve1           : FW...OK
VERBOSE: MachineArithmetic-Tests.Z3CAPITest >> #testPushPop
VERBOSE: MachineArithmetic... >> testPushPop          : FW...OK
DebugProcessExecute : An error has occurred...
At C:\Users\jv\AppData\Local\Temp\MachineArithmetic\stx\stx\bin\smalltalk.ps1:519 char:26
+ ... exit_code = DebugProcessExecute -executable $executable -stx_switch $ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DebugProcessExecute
 
VERBOSE: MachineArithmetic-Tests.Z3CAPITest >> #testQuantifier
VERBOSE: MachineArithmetic... >> testQuantifier       : FW...OK
[ERROR] happened in stx.com or PowerShell script - See log file: C:\Users\jv\AppData\Local\Temp\MachineArithmetic\s
tx\stx\bin\smalltalk_2022-07-12_utf8.log for more information.
VERBOSE: MachineArithmetic-Tests.Z3CAPITest >> #testSMT2Parser
VERBOSE: MachineArithmetic... >> testSMT2Parser       : FW...OK
VERBOSE: MachineArithmetic-Tests.Z3CAPITest >> #testSubstituteSubexpressions
VERBOSE: 

[ERROR] Error from PowerShell:


VERBOSE: 
VERBOSE: [INFO] Exiting from PowerShell with code 1 

No error (non-zero exit code) was indicated to calling make which in
turn indicated no error when make test.

Also note, that the output from St/X is seemingly ramdomly mixed up
with output of the launcher itself.

Expected behavior

The make test should ended up with an error, printing something like

make: *** [GNUmakefile:24: test] Error 3

Also, the output should not be mixed up.

Attachments (1)

smalltalk_2022-07-12_utf8.log (18.9 KB ) - added by vranyj1 22 months ago.
launcher log

Download all attachments as: .zip

Change History (1)

by vranyj1, 22 months ago

launcher log

Note: See TracTickets for help on using tickets.