2016-12-14 17:27:21 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-12-14 19:45:04 -06:00
|
|
|
source test-variables
|
|
|
|
|
|
|
|
MEM_TESTABLE=$1
|
|
|
|
if [[ -z $MEM_TESTABLE ]] ; then
|
|
|
|
echo "Missing parameter 1: MEM_TESTABLE"
|
|
|
|
exit 8
|
|
|
|
fi
|
|
|
|
MY_PROC=$2
|
|
|
|
if [[ -z $MY_PROC ]] ; then
|
|
|
|
echo "Missing parameter 2: MY_PROC"
|
|
|
|
exit 9
|
|
|
|
fi
|
|
|
|
|
|
|
|
BEGIN=`date +%s`
|
|
|
|
memtester ${MEM_TESTABLE}K 1 \
|
|
|
|
> $OUTPUT_DIR/memtester_$MY_PROC.out
|
|
|
|
RET=$?
|
2016-12-21 19:26:42 -06:00
|
|
|
# TODO: Comment out this hardcoded value used for DEBUG
|
2016-12-23 03:42:14 -06:00
|
|
|
# [[ $MY_PROC == 4 ]] && RET=128
|
2016-12-14 19:45:04 -06:00
|
|
|
echo $RET > $OUTPUT_DIR/memtester_$MY_PROC.ret
|
|
|
|
END=`date +%s`
|
|
|
|
|
|
|
|
DURATION=$(( END - BEGIN ))
|
|
|
|
echo -n "${BLD}Process $MY_PROC${OFF} : ${MEM_TESTABLE}kB tested in ${DURATION}s : " \
|
|
|
|
> $OUTPUT_DIR/memtester_$MY_PROC.result
|
2016-12-20 05:05:22 -06:00
|
|
|
echo -n "$SERVER_SERIAL|$MY_PROC|${MEM_TESTABLE}kB|${DURATION}s|" \
|
|
|
|
> $OUTPUT_DIR/memtester_$MY_PROC.csv
|
2016-12-14 19:45:04 -06:00
|
|
|
if [[ "$RET" == "0" ]] ; then
|
|
|
|
echo $RES_OK \
|
|
|
|
>> $OUTPUT_DIR/memtester_$MY_PROC.result
|
2016-12-20 05:05:22 -06:00
|
|
|
echo 'OK|' >> $OUTPUT_DIR/memtester_$MY_PROC.csv
|
2016-12-14 19:45:04 -06:00
|
|
|
else
|
|
|
|
cat $OUTPUT_DIR/memtester_$MY_PROC.out \
|
|
|
|
>> $OUTPUT_DIR/memtester_$MY_PROC.result
|
|
|
|
echo $RES_FAIL_BIG \
|
|
|
|
>> $OUTPUT_DIR/memtester_$MY_PROC.result
|
2016-12-20 05:15:31 -06:00
|
|
|
echo "FAIL|Return code: $RET" >> $OUTPUT_DIR/memtester_$MY_PROC.csv
|
2016-12-14 19:45:04 -06:00
|
|
|
fi
|
|
|
|
cat $OUTPUT_DIR/memtester_$MY_PROC.result
|
2016-12-14 17:27:21 -06:00
|
|
|
|