mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Fix network usage tracking un global results
This commit is contained in:
parent
6a54faa077
commit
8fd0ce6375
2 changed files with 30 additions and 0 deletions
|
@ -777,6 +777,16 @@ start_timer
|
|||
# And keep this value separately
|
||||
complete_start_timer=$starttime
|
||||
|
||||
#=================================================
|
||||
# Set the network followup for all tests
|
||||
#=================================================
|
||||
|
||||
# Start the network usage followup
|
||||
start_network_usage
|
||||
# And keep these values separately
|
||||
complete_start_rx_usage=$start_rx_usage
|
||||
complete_start_tx_usage=$start_tx_usage
|
||||
|
||||
#=================================================
|
||||
# Initialize tests
|
||||
#=================================================
|
||||
|
@ -1211,6 +1221,15 @@ echo "You can find the complete log of these tests in $complete_log"
|
|||
starttime=$complete_start_timer
|
||||
# End the timer for the test
|
||||
stop_timer 3
|
||||
|
||||
#=================================================
|
||||
# Ending the network usage followup
|
||||
#=================================================
|
||||
|
||||
# Restore the orgin values
|
||||
start_rx_usage=$complete_start_rx_usage
|
||||
start_tx_usage=$complete_start_tx_usage
|
||||
# End the followup
|
||||
stop_network_usage 3
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -1418,6 +1418,12 @@ TEST_LAUNCHER () {
|
|||
# And keep this value separately
|
||||
local global_start_timer=$starttime
|
||||
|
||||
# Start the network usage followup
|
||||
start_network_usage
|
||||
# And keep these values separately
|
||||
local complete_start_rx_usage=$start_rx_usage
|
||||
local complete_start_tx_usage=$start_tx_usage
|
||||
|
||||
# Execute the test
|
||||
$1 $2
|
||||
|
||||
|
@ -1431,6 +1437,11 @@ TEST_LAUNCHER () {
|
|||
starttime=$global_start_timer
|
||||
# End the timer for the test
|
||||
stop_timer 2
|
||||
|
||||
# Restore the orgin values
|
||||
start_rx_usage=$complete_start_rx_usage
|
||||
start_tx_usage=$complete_start_tx_usage
|
||||
# End the followup
|
||||
stop_network_usage 2
|
||||
|
||||
# Update the lock file with the date of the last finished test.
|
||||
|
|
Loading…
Add table
Reference in a new issue