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:
33
prod/Common
33
prod/Common
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user