aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-12-20 16:14:06 +0100
committerSverker Eriksson <[email protected]>2016-12-20 16:14:06 +0100
commita3b58a857a9d1a4d4bec051bf7814580e4254f02 (patch)
tree6905698b85ff93abec76231b42a9af7d26380c7a /erts/emulator/test
parent61632545f446689ade83d3e5d1c81d0e506708c8 (diff)
parentc1eebebee04d7a9585d47583f15bf56b25e96a17 (diff)
downloadotp-a3b58a857a9d1a4d4bec051bf7814580e4254f02.tar.gz
otp-a3b58a857a9d1a4d4bec051bf7814580e4254f02.tar.bz2
otp-a3b58a857a9d1a4d4bec051bf7814580e4254f02.zip
Merge branch 'sverker/misc-master'
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/driver_SUITE_data/chkio_drv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/erts/emulator/test/driver_SUITE_data/chkio_drv.c b/erts/emulator/test/driver_SUITE_data/chkio_drv.c
index 614b68e865..8e5e81665c 100644
--- a/erts/emulator/test/driver_SUITE_data/chkio_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/chkio_drv.c
@@ -1397,10 +1397,18 @@ static void assert_print(char* str, int line)
static void assert_failed(ErlDrvPort port, char* str, int line)
{
char buf[30];
+ size_t bufsz = sizeof(buf);
+
assert_print(str,line);
- snprintf(buf,sizeof(buf),"failed_at_line_%d",line);
- driver_failure_atom(port,buf);
- /*abort();*/
+
+ if (erl_drv_getenv("ERL_ABORT_ON_FAILURE", buf, &bufsz) == 0
+ && (strcmp("true", buf) == 0 || strcmp("yes", buf) == 0)) {
+ abort();
+ }
+ else {
+ snprintf(buf,sizeof(buf),"failed_at_line_%d",line);
+ driver_failure_atom(port,buf);
+ }
}
#define my_driver_select(PORT,FD,MODE,ON) \