-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
65 lines (48 loc) · 1.7 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Test Gear TODO
--------------
Loosely written notes...
testgearctl user interface
--------------------------
Proposed commandline interface:
Usage: testgearctl [<options>] [script]
Options:
--interactive Enter interactive mode
--help Display help
--version Display version
If provided the script file will be executed.
If a script file is provided in combination with interactive mode then
testgearctl will enter interactive mode after executing the script.
testgearctl script language
---------------------------
Test Gear scripts will be written in Lua.
Lua is a powerful, fast, lightweight, embeddable scripting language.
The script language and the Test Gear API will be available in interactive
mode.
Ultimately we want to be able to do something like this in the interactive
prompt with autocompletion support for quick and easy navigation:
> device = connect("191.168.0.42")
> device.load("fb")
> = device.fb.version
0.1
> = device.fb.description
Frambuffer test plugin
> = device.fb.author
Martin Lund
> = device.fb.license
BSD-3
> device.fb.xres = 1920
> device.fb.yres = 1080
> device.fb.xoffset = 0
> device.fb.yoffset = 0
> device.fb.open()
> device.fb.show.image = "/images/test.png"
> device.fb.show.stretch = "yes"
> device.fb.show()
> device.fb.close()
> device.unload("fb")
The same commmands can be reused and fired from a script.
Notice that the connect() call returns connection handles. This allows us to
connect to multiple Test Gear device servers in the same test script. This will
be useful in a distributed test configuration where you have multiple test
devices or instruments at multiple workstations (spectrum analyzers,
oscilloscopes, voltage meters, actuators, sensors, etc.).