Skip to content

Commit 664c833

Browse files
committed
Revert master+wip to master (2780988)
Signed-off-by: Keith Rothman <[email protected]>
1 parent 1c5263d commit 664c833

File tree

133 files changed

+20902
-4328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+20902
-4328
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
74

85
---
96

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
74

85
---
96

.github/ISSUE_TEMPLATE/vtr-change.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

ODIN_II/exec_wrapper.sh

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ PERF_EXEC="perf stat record -a -d -d -d -o"
2323
GDB_EXEC="gdb --args"
2424
EXEC_PREFIX=""
2525

26+
TOOL_LIST=""
27+
2628
TEST_NAME="N/A"
2729
LOG=""
2830
LOG_FILE=""
@@ -98,6 +100,7 @@ Usage: ./exec_wrapper.sh [options] <path/to/arguments.file>
98100
--time_limit * stops Odin after X seconds
99101
--limit_ressource * limit ressource usage using ulimit -m (25% of hrdw memory) and nice value of 19
100102
--verbosity [0, 1, 2] * [0] no output, [1] output on error, [2] output the log to stdout
103+
--no_color * force no color on output
101104
"
102105
}
103106

@@ -213,6 +216,12 @@ then
213216
_exit_with_code "-1"
214217
fi
215218

219+
if [[ -t 1 ]] && [[ -t 2 ]] && [[ ! -p /dev/stdout ]] && [[ ! -p /dev/stderr ]]
220+
then
221+
COLORIZE_OUTPUT="on"
222+
log_it "Using colorized output\n"
223+
fi
224+
216225
while [[ "$#" > 0 ]]
217226
do
218227
case $1 in
@@ -242,6 +251,10 @@ do
242251
RESTRICT_RESSOURCE="on"
243252
;;
244253

254+
--no_color)
255+
COLORIZE_OUTPUT="off"
256+
;;
257+
245258
--verbosity)
246259
case "_$2" in
247260
_0) VERBOSE="0";;
@@ -267,14 +280,17 @@ do
267280
else
268281
case $2 in
269282
valgrind)
283+
TOOL_LIST="valgrind ${TOOL_LIST}"
270284
EXEC_PREFIX="${VALGRIND_EXEC} ${EXEC_PREFIX}"
271285
;;
272286
gdb)
287+
TOOL_LIST="gdb ${TOOL_LIST}"
273288
USE_TIMEOUT="off"
274289
USE_LOGS="off"
275290
EXEC_PREFIX="${GDB_EXEC} ${EXEC_PREFIX}"
276291
;;
277292
perf)
293+
TOOL_LIST="perf ${TOOL_LIST}"
278294
EXEC_PREFIX="${PERF_EXEC} ${EXEC_PREFIX}"
279295
shift
280296
;;
@@ -302,13 +318,6 @@ then
302318
restrict_ressource
303319
fi
304320

305-
306-
if [[ -t 1 ]] && [[ -t 2 ]] && [[ ! -p /dev/stdout ]] && [[ ! -p /dev/stderr ]]
307-
then
308-
COLORIZE_OUTPUT="on"
309-
log_it "Using colorized output\n"
310-
fi
311-
312321
if [ "${USE_LOGS}" == "on" ]
313322
then
314323
if [ "_${LOG_FILE}" == "_" ]
@@ -331,12 +340,14 @@ fi
331340

332341
if [ "${USE_TIME}" == "on" ]
333342
then
343+
TOOL_LIST="time ${TOOL_LIST}"
334344
EXEC_PREFIX="${TIME_EXEC} --output=${LOG_FILE} --append ${EXEC_PREFIX}"
335345
log_it "running with /bin/time\n"
336346
fi
337347

338348
if [ "${USE_TIMEOUT}" == "on" ]
339349
then
350+
TOOL_LIST="timeout ${TOOL_LIST}"
340351
EXEC_PREFIX="timeout ${TIME_LIMIT} ${EXEC_PREFIX}"
341352
log_it "running with timeout ${TIME_LIMIT}\n"
342353
fi
@@ -352,23 +363,52 @@ then
352363
log_it "Must define a path to a valid argument file"
353364
dump_log
354365
else
355-
_ARGS=$(cat ${ARG_FILE})
356-
if [ "${USE_LOGS}" == "on" ]
366+
failed_requirements=""
367+
# test all necessary tool
368+
for tool_used in ${TOOL_LIST}
369+
do
370+
which ${tool_used} &> /dev/null
371+
if [ "$?" != "0" ];
372+
then
373+
failed_requirements="${tool_used} ${failed_requirements}"
374+
fi
375+
done
376+
377+
if [ "_${failed_requirements}" != "_" ];
357378
then
358-
if [ "${VERBOSE}" == "2" ]
379+
if [ "${USE_LOGS}" == "on" ]
359380
then
360-
${EXEC_PREFIX} ${_ARGS} 2>&1 | tee ${LOG_FILE}
381+
if [ "${VERBOSE}" == "2" ]
382+
then
383+
echo "missing \"${failed_requirements}\"" | tee ${LOG_FILE}
384+
else
385+
echo "missing \"${failed_requirements}\"" &>> ${LOG_FILE}
386+
fi
361387
else
362-
${EXEC_PREFIX} ${_ARGS} &>> ${LOG_FILE}
388+
echo "missing \"${failed_requirements}\""
363389
fi
390+
391+
EXIT_CODE="-1"
392+
pretty_print_status "Missing package: ${failed_requirements}"
393+
364394
else
365-
${EXEC_PREFIX} ${_ARGS}
395+
_ARGS=$(cat ${ARG_FILE})
396+
if [ "${USE_LOGS}" == "on" ]
397+
then
398+
if [ "${VERBOSE}" == "2" ]
399+
then
400+
${EXEC_PREFIX} ${_ARGS} 2>&1 | tee ${LOG_FILE}
401+
else
402+
${EXEC_PREFIX} ${_ARGS} &>> ${LOG_FILE}
403+
fi
404+
else
405+
${EXEC_PREFIX} ${_ARGS}
406+
fi
407+
EXIT_CODE=$?
408+
display "${EXIT_CODE}"
366409
fi
367-
EXIT_CODE=$?
368410
fi
369411

370-
display "${EXIT_CODE}"
371-
372412
EXIT_STATUS=0
373413
if [ "${EXIT_CODE}" != "0" ]
374414
then
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
script_synthesis_params=--verbosity 1
2-
script_simulation_params=--verbosity 1
1+
script_synthesis_params=--verbosity 1 --no_color
2+
script_simulation_params=--verbosity 1 --no_color

0 commit comments

Comments
 (0)