HOWTO_TEST.txt
2.79 KB
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
*************************************************************************************
Here is how you can TEST that pyros is working well (ensure that nothing is broken)
*************************************************************************************
(More on this subject at https://docs.google.com/document/d/1osHT3d8GiofRd9k3nL7cz4Hcmo9WVEOcSaSSQpgJcFs/edit#heading=h.odcd50f0rjwh)
(A) Running the unit tests suite:
- (1) Some unit tests only:
$ ./pyros.py test
- (2) All unit tests:
$ ./pyros.py testall
(B) Test with agents:
- (1) Test with agentA and agentB sending commands to each other:
$ ./pyros.py -t start agentA,agentB
- (2) Test with agentTelescopeRequester sending commands to the Gemini telescope (or its simulator) :
- test with telescope SIMULATOR (use -s option) :
$ ./pyros.py -ts start agentDeviceGemini,agentTelescopeRequester
- test with REAL telescope :
$ ./pyros.py -t start agentDeviceGemini,agentTelescopeRequester
- (3) Test with agentMultiRequester (AgentMajordome like) sending commands to several device agents at once : the Gemini telescope device agent (or simulator), and the SBIG device agent (or simulator):
$ ./pyros.py -t start agentDeviceGemini,agentDeviceSBIG,agentMultiRequester
(C) Interactive testing:
$ ./pyros.py shell
(D) Devices testing:
$ cd src/devices_controller/
Suivre les instructions du document README.md de ce dossier
*************************************************************************************
Use netstat to see if a simulator is (still) listening
*************************************************************************************
$ netstat -tnl | grep 1111
udp4 0 0 127.0.0.1.11112 *.*
udp4 0 0 127.0.0.1.11110 *.*
To see which processus is responsible for this connection, use -v (or -p on linux)
$ netstat -tnlv | grep 1111
udp4 0 0 127.0.0.1.11112 *.* 786896 9216 24386 0 0x0000 0x00000000
udp4 0 0 127.0.0.1.11110 *.* 786896 9216 3226 0 0x0000 0x00000000
Here, we see that process 3226 has launched a simulator on port 11110
To see this process detailed :
$ ps -efl|grep 3226
501 3226 1 0 30sep19 ?? 0:41.77 /usr/local/Cella 4046 31 0 4331296 608 - S 0
Idem for process 24386:
$ ps -efl|grep 24386
501 24386 1 0 4:04 ttys001 0:01.15 /usr/local/Cella 4046 31 0 4332056 40156 - S 0
Information about a specific process:
$ ps -p 24386
24386 ttys001 0:01.24 /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python AgentDeviceSBIG.py -t -s
=> Now, we are sure this is the right process to kill