Skip to content

Commit cc722d4

Browse files
committed
Fix missing signal messages for regtest
1 parent 6584d8a commit cc722d4

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

test/regtest/exec.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
#
3+
# Copyright (C) National University of Singapore
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
trap '' SIGILL SIGTRAP SIGSEGV
19+
ulimit -c 0
20+
"$@"
21+

test/regtest/regtest.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ static bool runTest(const struct dirent *test, const std::string &options)
112112
// Step (2): execute the EXE
113113
FILE *CMD = fopen(cmd.c_str(), "r");
114114
command.clear();
115+
command += "./exec.sh ";
115116
if (CMD != NULL)
116117
{
117118
for (int i = 0; (c = getc(CMD)) != '\n' && isprint(c) && i < 1024; i++)
@@ -137,10 +138,6 @@ static bool runTest(const struct dirent *test, const std::string &options)
137138
r, out.c_str());
138139
return false;
139140
}
140-
command.clear();
141-
command = "sed -i 's/ (core dumped)//g' ";
142-
command += out;
143-
system(command.c_str());
144141

145142
// Step (3): compare the output
146143
FILE *OUT = fopen(out.c_str(), "r");

0 commit comments

Comments
 (0)