Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
0594ac5c
Commit
0594ac5c
authored
Aug 28, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test-board-synchro
parent
fe7bcdd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
scripts/test-board-synchro
scripts/test-board-synchro
+22
-20
No files found.
scripts/test-board-synchro
View file @
0594ac5c
#!/bin/bash
script_dir
=
$(
dirname
$(
realpath
$0
))
usage
()
{
cat
<<
ENDUSAGE
Usage:
$0
[-h] [-i USEC -c USEC -s] [-T] BOARD1_HOSTNAME BOARD2_HOSTNAME
...
...
@@ -66,19 +68,19 @@ echo "Starting ptp4l on master";
killall ptp4l
;
if
[
-n
"
$software_ts
"
]
;
then
.
/run-ptp4l
-i
enp1s0
;
.
/run-ptp4l
-i
enp2s0
;
$script_dir
/run-ptp4l
-i
enp1s0
;
$script_dir
/run-ptp4l
-i
enp2s0
;
else
.
/run-ptp4l
-i
enp1s0
-H
;
.
/run-ptp4l
-i
enp2s0
-H
;
$script_dir
/run-ptp4l
-i
enp1s0
-H
;
$script_dir
/run-ptp4l
-i
enp2s0
-H
;
fi
echo
"Starting ptp4l on slaves"
;
.
/sudossh
$board1
"killall ptp4l"
;
.
/sudossh
$board2
"killall ptp4l"
;
.
/sudossh
$board1
"run-ptp4l -s"
;
.
/sudossh
$board2
"run-ptp4l -s"
;
$script_dir
/sudossh
$board1
"killall ptp4l"
;
$script_dir
/sudossh
$board2
"killall ptp4l"
;
$script_dir
/sudossh
$board1
"run-ptp4l -s"
;
$script_dir
/sudossh
$board2
"run-ptp4l -s"
;
echo
"Waiting for ptp to take effect..."
;
...
...
@@ -88,8 +90,8 @@ sleep 30;
#phc2sys -arrm &> ~/phc2sys1_log&
#phc2sys -arrm &> ~/phc2sys2log&
.
/run-phc2sys
-i
enp1s0
;
.
/run-phc2sys
-i
enp2s0
;
$script_dir
/run-phc2sys
-i
enp1s0
;
$script_dir
/run-phc2sys
-i
enp2s0
;
echo
"Waiting for phc2sys to take effect..."
;
...
...
@@ -97,20 +99,20 @@ sleep 20;
echo
"Start servers on slave"
;
.
/sudossh
$board1
"setup_irqs"
;
.
/sudossh
$board2
"setup_irqs"
;
$script_dir
/sudossh
$board1
"setup_irqs"
;
$script_dir
/sudossh
$board2
"setup_irqs"
;
.
/sudossh
$board1
"killall server"
;
.
/sudossh
$board2
"killall server"
;
$script_dir
/sudossh
$board1
"killall server"
;
$script_dir
/sudossh
$board2
"killall server"
;
if
[
-n
"
$enable_tracing
"
]
;
then
server_opts+
=
" -T
$((
interval
*
2
))
-E
\"
-e irq -e sched -e net -e napi -e gpio
\"
-B 100000"
fi
.
/exec-ssh-nohup
$board1
"run-server -c
$server_opts
"
;
.
/exec-ssh-nohup
$board2
"run-server -c
$server_opts
"
;
$script_dir
/exec-ssh-nohup
$board1
"run-server -c
$server_opts
"
;
$script_dir
/exec-ssh-nohup
$board2
"run-server -c
$server_opts
"
;
cd
../gettime/build
;
cd
$script_dir
/
../gettime/build
;
make
;
time
=
$(
./gettime
-r
-q
)
...
...
@@ -121,11 +123,11 @@ time=$((time + 10000000000))
echo
"Start clients on master"
;
cd
../../scripts
;
cd
$script_dir
;
if
[
-z
"
$delay
"
]
;
then
delay
=
$((
interval
/
2
))
fi
.
/run-client
-a
1
-q
-i
$interval
-p
-I
enp1s0
-c
$delay
-s
$time
$board1
&> client_enp1s0_log&
.
/run-client
-a
2
-q
-i
$interval
-p
-I
enp2s0
-c
$delay
-s
$time
$board2
&> client_enp2s0_log&
$script_dir
/run-client
-a
1
-q
-i
$interval
-p
-I
enp1s0
-c
$delay
-s
$time
$board1
&> client_enp1s0_log&
$script_dir
/run-client
-a
2
-q
-i
$interval
-p
-I
enp2s0
-c
$delay
-s
$time
$board2
&> client_enp2s0_log&
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment