Skip to content

Commit 01d6138

Browse files
committed
engine: Add file exporting exit codes of cloe-engine
1 parent 907095d commit 01d6138

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

engine/dist/exit-codes.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
#
3+
# This file exports cloe-engine exit codes. This file can be used in tests
4+
# to assert that the output of a simulation has/does not have a certain
5+
# status. Feel free to copy out the lines or copy the file, but avoid linking
6+
# directly to this file.
7+
8+
# The following exit codes are used by cloe-engine and can be used to assert
9+
# that the outcome of the test is as expected.
10+
#
11+
# These values are taken from: src/simulation_context.hpp
12+
export CLOE_EXIT_SUCCESS=0
13+
export CLOE_EXIT_UNKNOWN=1
14+
export CLOE_EXIT_NOSTART=4
15+
export CLOE_EXIT_STOPPED=8
16+
export CLOE_EXIT_FAILURE=9
17+
export CLOE_EXIT_ABORTED=16
18+
19+
# This exit outcome is different for each environment: In Python it's 250 and
20+
# in Bash it's 134, for example. Since we are running cloe-engine directly from
21+
# BATS, we expect 134 when cloe-engine is force-killed.
22+
#
23+
# "Force kill" usually happens when the user presses Ctrl+C multiple times or
24+
# the operating system kills the process directly.
25+
export CLOE_EXIT_SYSKILL=134

0 commit comments

Comments
 (0)