Blame view

HOWTO_TEST.txt 2.79 KB
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
1
2
3
4
5

*************************************************************************************
 Here is how you can TEST that pyros is working well (ensure that nothing is broken)
*************************************************************************************

321c1c7d   Etienne Pallier   updated HOWTO
6
7
8
(More on this subject at https://docs.google.com/document/d/1osHT3d8GiofRd9k3nL7cz4Hcmo9WVEOcSaSSQpgJcFs/edit#heading=h.odcd50f0rjwh)


e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
9
10
(A) Running the unit tests suite:
- (1) Some unit tests only:
c84c9d3b   Etienne Pallier   update doc test e...
11
	$ ./pyros.py test
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
12
- (2) All unit tests:
c84c9d3b   Etienne Pallier   update doc test e...
13
	$ ./pyros.py testall
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
14
15
16

(B) Test with agents:
- (1) Test with agentA and agentB sending commands to each other:
c84c9d3b   Etienne Pallier   update doc test e...
17
	$ ./pyros.py -t start agentA,agentB
61df368d   Etienne Pallier   Mis à jour Enviro...
18
- (2) Test with agentTelescopeRequester sending commands to the Gemini telescope (or its simulator) :
051e085c   Etienne Pallier   mise à jour des n...
19
	- test with telescope SIMULATOR (use -s option) :
57621753   Etienne Pallier   NOUVELLE ARCHI un...
20
		$ ./pyros.py -ts start agentDeviceGemini,agentTelescopeRequester
051e085c   Etienne Pallier   mise à jour des n...
21
	- test with REAL telescope :
57621753   Etienne Pallier   NOUVELLE ARCHI un...
22
		$ ./pyros.py -t start agentDeviceGemini,agentTelescopeRequester
1c5910c6   Etienne Pallier   fin renommage (bu...
23
- (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):
57621753   Etienne Pallier   NOUVELLE ARCHI un...
24
		$ ./pyros.py -t start agentDeviceGemini,agentDeviceSBIG,agentMultiRequester
4783e5b5   Etienne Pallier   GROS RENOMMAGE de...
25
	 
e0bd046a   Etienne Pallier   - Ajouté 2 HOWTO ...
26
(C) Interactive testing:
c84c9d3b   Etienne Pallier   update doc test e...
27
	$ ./pyros.py shell
321c1c7d   Etienne Pallier   updated HOWTO
28

c84c9d3b   Etienne Pallier   update doc test e...
29
30
31
32
(D) Devices testing:
	$ cd src/devices_controller/
Suivre les instructions du document README.md de ce dossier
 
102bd63f   Etienne Pallier   1er debut de solu...
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

 
*************************************************************************************
 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