first approach of a regression-test experiment

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1465 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hellwig
2012-08-01 12:06:32 +00:00
parent 6b540d738c
commit ac199248a3
5 changed files with 152 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#!/bin/bash
set -e
TARGET=experimentInfo.hpp
[ ! -e "$1" ] && echo "usage: $0 regression-test.elf" && exit 1
function addrof() { nm -C $1 | (fgrep "$2" || echo 99999999) | awk '{print $1}'; }
cat >$TARGET <<EOF
#ifndef __REGRESSION_TEST_EXPERIMENT_INFO_HPP__
#define __REGRESSION_TEST_EXPERIMENT_INFO_HPP__
// autogenerated, don't edit!
EOF
function alldefs() {
cat <<EOF
// loop_done() address:
// nm -C $(basename $1)|fgrep loop_done
#define REGRESSION_FUNC_LOOP_DONE 0x`addrof $1 loop_done`
#define REGRESSION_FUNC_MTEST_READ 0x`addrof $1 mtest_read`
#define REGRESSION_FUNC_MTEST_WRITE 0x`addrof $1 mtest_write`
EOF
}
alldefs $1 >>$TARGET
cat >>$TARGET <<EOF
#endif
EOF