Date:2011-04-20 13:13:27 (12 years 11 months ago)
Author:Werner Almesberger
Commit:cd59b8524b24acaa9a3f56f50b4a27b573661cb4
Message: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
Files: prod/Common (5 diffs)
prod/Makefile (1 diff)
prod/atben (1 diff)
prod/atusb (1 diff)

Change Details

prod/Common
2626    LOCAL_DUT=default
2727fi
2828
29
30##### Test setup ############################################################
31
32
2933step()
3034{
3135    echo -n " .... $1"
...... 
3640}
3741
3842
43##### Test result ###########################################################
44
45
3946finish()
4047{
4148    echo "$cmd" >>$LOG
...... 
7380}
7481
7582
83##### Test execution ##########################################################
84
85
7686cmd()
7787{
7888    cmd=$1
7989}
8090
8191
92##### Evaluation ############################################################
93
94
8295expect()
8396{
8497    eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
...... 
95108}
96109
97110
111##### Tests #################################################################
112
113
114begin()
115{
116    if [ -z "$1" ]; then
117        echo "usage: begin profile" 1>&2
118        exit 1
119    fi
120    PROFILE=$1
121    if [ ! -r $PROFILE ]; then
122        echo "$PROFILE not found" 1>&2
123        exit 1
124    fi
125}
126
127
98128identify()
99129{
100130    step "Identification"
...... 
108138    step "Spectrum"
109139# todo:
110140# - trim values (maybe)
111# - profile
112141# - decide on power
113142# - decide on offset
114    cmd "atrf-path -g -T +0.5 $REF $DUT 10"
143    cmd "atrf-path -g -T +0.5 -P $PROFILE $REF $DUT 10"
115144    expect PASS
116145}
117146
prod/Makefile
1#
2# This Makefile just contains a few convenience commands, for development
3#
4
5
6.PHONY: all ben usb
7
8all: ben
9
10ben: ben.profile
11    ./atben net:ben net:jlime
12
13usb: usb.profile
14    ./atusb net:ben usb
15
16ben.profile:
17    cp ../tools/atrf-path/profile.example $@
18
19usb.profile:
20    cp ../tools/atrf-path/profile.example $@
prod/atben
1818}
1919
2020
21identify
21begin ben.profile
2222# power ?
2323gpio_ben
24identify
2425xtal_ben
2526spectrum
2627transmit
prod/atusb
1#!/bin/sh
2
3. ./Common
4
5
6flash()
7{
8    step "Flash boot loader"
9    todo
10}
11
12
13enumerate()
14{
15    step "Enumeration"
16    todo
17}
18
19
20led()
21{
22    step "LED"
23    todo
24}
25
26
27dfu()
28{
29    step "DFU application"
30    todo
31}
32
33
34gpio_usb()
35{
36    step "GPIO scan"
37    todo
38}
39
40
41xtal_usb()
42{
43    step "Crystal frequency"
44    todo
45}
46
47
48begin usb.profile
49flash
50enumerate
51led
52dfu
53# power ?
54gpio_usb
55# identify # local anomaly (using a 230-based card at the moment)
56xtal_usb
57spectrum
58transmit

Archive Download the corresponding diff file



interactive