aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-12-07 17:24:10 +0100
committerSverker Eriksson <[email protected]>2016-12-19 18:24:54 +0100
commit9e334f98679ace2c0fb7b9893c962a9d1a80e41c (patch)
treeccd7a6473dd6dfafc2b5f3c0887e7ae6c563f0ff /erts/emulator
parentf34066894c3aa464636090213696cac1aeb67092 (diff)
downloadotp-9e334f98679ace2c0fb7b9893c962a9d1a80e41c.tar.gz
otp-9e334f98679ace2c0fb7b9893c962a9d1a80e41c.tar.bz2
otp-9e334f98679ace2c0fb7b9893c962a9d1a80e41c.zip
erts: Add ERL_ABORT_ON_FAILURE for driver_SUITE
Diffstat (limited to 'erts/emulator')
-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) \