1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2025-04-21 12:27:27 +03:00

prod/: on-going development

- prod/Common: added section titles
- prod/Common (begin): new command to set up and check the test environment
- prof/atben: call "begin" to set up the test environment
- prod/Common (spectrum): added the profile
- prod/Makefile: convenience commands, for development
- prod/atben: run "identify" after checking the GPIOs
- prod/atusb: test script for ATUSB
This commit is contained in:
Werner Almesberger
2011-04-20 08:13:27 -03:00
parent 04db5e0418
commit cd59b8524b
4 changed files with 111 additions and 3 deletions

View File

@@ -26,6 +26,10 @@ else
LOCAL_DUT=default
fi
##### Test setup ############################################################
step()
{
echo -n " .... $1"
@@ -36,6 +40,9 @@ step()
}
##### Test result ###########################################################
finish()
{
echo "$cmd" >>$LOG
@@ -73,12 +80,18 @@ todo()
}
##### Test execution ##########################################################
cmd()
{
cmd=$1
}
##### Evaluation ############################################################
expect()
{
eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
@@ -95,6 +108,23 @@ expect_re()
}
##### Tests #################################################################
begin()
{
if [ -z "$1" ]; then
echo "usage: begin profile" 1>&2
exit 1
fi
PROFILE=$1
if [ ! -r $PROFILE ]; then
echo "$PROFILE not found" 1>&2
exit 1
fi
}
identify()
{
step "Identification"
@@ -108,10 +138,9 @@ spectrum()
step "Spectrum"
# todo:
# - trim values (maybe)
# - profile
# - decide on power
# - decide on offset
cmd "atrf-path -g -T +0.5 $REF $DUT 10"
cmd "atrf-path -g -T +0.5 -P $PROFILE $REF $DUT 10"
expect PASS
}