Skip to content

Commit 80e9b3a

Browse files
committed
WIP: profiling testcase now starts the server
1 parent 19a6c28 commit 80e9b3a

2 files changed

Lines changed: 45 additions & 45 deletions

File tree

src/tests/multi-server/environments/profiling.yml.j2

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@ services:
2727
- |
2828
# Keep the container alive. The test framework starts FreeRADIUS
2929
# and runs commands via 'docker exec' so it can control timing.
30-
#sleep infinity
31-
32-
#
33-
# proto_load configuration via environment variables
34-
#
35-
{%- for key, value in loadgen.items() %}
36-
export TEST_LOADGEN_{{ key | upper }}="{{ value }}"
37-
{%- endfor %}
38-
39-
TEST_LOADGEN_NUM_MESSAGES=0
40-
for ((pps=$TEST_LOADGEN_START_PPS; pps<=$TEST_LOADGEN_MAX_PPS; pps+=$TEST_LOADGEN_STEP)); do
41-
TEST_LOADGEN_NUM_MESSAGES=$((TEST_LOADGEN_NUM_MESSAGES + TEST_LOADGEN_DURATION * pps))
42-
done
43-
export TEST_LOADGEN_NUM_MESSAGES
44-
45-
#
46-
# Starting profiling-server server which will generate traffic based on env configuration
47-
# from above.
4830
#
49-
printf "Starting profiling-server with the following configuration:\n"
50-
{%- for key, value in loadgen.items() %}
51-
printf " {{ key | upper }}:%s\n" "$TEST_LOADGEN_{{ key | upper }}"
52-
{%- endfor %}
53-
printf " NUM_MESSAGES: %s\n" "$TEST_LOADGEN_NUM_MESSAGES"
31+
# Start the server after configuring environment variables from test case's template.yml.j2 file.
32+
sleep infinity
5433

55-
exec freeradius -f -l stdout
34+
## TO BE USED FOR DEBUGGING PURPOSES ONLY, NOT TO BE EXECUTED BY DEFAULT
35+
##
36+
## proto_load configuration via environment variables
37+
##
38+
#{%- for key, value in loadgen.items() %}
39+
#export TEST_LOADGEN_{{ key | upper }}="{{ value }}"
40+
#{%- endfor %}
41+
#TEST_LOADGEN_NUM_MESSAGES=0
42+
#for ((pps=$TEST_LOADGEN_START_PPS; pps<=$TEST_LOADGEN_MAX_PPS; pps+=$TEST_LOADGEN_STEP)); do
43+
# TEST_LOADGEN_NUM_MESSAGES=$((TEST_LOADGEN_NUM_MESSAGES + TEST_LOADGEN_DURATION * pps))
44+
#done
45+
#export TEST_LOADGEN_NUM_MESSAGES
46+
##
47+
## Starting profiling-server server which will generate traffic based on env configuration
48+
## from above.
49+
##
50+
#printf "Starting profiling-server with the following configuration:\n"
51+
#{%- for key, value in loadgen.items() %}
52+
#printf " {{ key | upper }}:%s\n" "$TEST_LOADGEN_{{ key | upper }}"
53+
#{%- endfor %}
54+
#printf " NUM_MESSAGES: %s\n" "$TEST_LOADGEN_NUM_MESSAGES"
55+
#exec freeradius -f -l stdout
5656
<<: *id001

src/tests/multi-server/tests/prof-accept/template.yml.j2

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ states:
99
actions:
1010
- execute_command:
1111
command: |
12-
##
13-
## proto_load configuration via environment variables
14-
##
15-
#{%- for key, value in loadgen.items() %}
16-
#export TEST_LOADGEN_{{ key | upper }}="{{ value }}"
17-
#{%- endfor %}
18-
#TEST_LOADGEN_NUM_MESSAGES=0
19-
#for ((pps=$TEST_LOADGEN_START_PPS; pps<=$TEST_LOADGEN_MAX_PPS; pps+=$TEST_LOADGEN_STEP)); do
20-
# TEST_LOADGEN_NUM_MESSAGES=$((TEST_LOADGEN_NUM_MESSAGES + TEST_LOADGEN_DURATION * pps))
21-
#done
22-
#export TEST_LOADGEN_NUM_MESSAGES
23-
##
24-
## Starting load-generator server which will generate traffic based on env configuration
25-
## from above.
26-
##
27-
#printf "Starting load-generator with the following configuration:\n"
28-
#{%- for key, value in loadgen.items() %}
29-
#printf " {{ key | upper }}:%s\n" "$TEST_LOADGEN_{{ key | upper }}"
30-
#{%- endfor %}
31-
#printf " NUM_MESSAGES: %s\n" "$TEST_LOADGEN_NUM_MESSAGES"
3212
#
33-
#exec freeradius -f -l stdout
13+
# proto_load configuration via environment variables
14+
#
15+
{%- for key, value in loadgen.items() %}
16+
export TEST_LOADGEN_{{ key | upper }}="{{ value }}"
17+
{%- endfor %}
18+
TEST_LOADGEN_NUM_MESSAGES=0
19+
for ((pps=$TEST_LOADGEN_START_PPS; pps<=$TEST_LOADGEN_MAX_PPS; pps+=$TEST_LOADGEN_STEP)); do
20+
TEST_LOADGEN_NUM_MESSAGES=$((TEST_LOADGEN_NUM_MESSAGES + TEST_LOADGEN_DURATION * pps))
21+
done
22+
export TEST_LOADGEN_NUM_MESSAGES
23+
#
24+
# Starting load-generator server which will generate traffic based on env configuration
25+
# from above.
26+
#
27+
printf "Starting load-generator with the following configuration:\n"
28+
{%- for key, value in loadgen.items() %}
29+
printf " {{ key | upper }}:%s\n" "$TEST_LOADGEN_{{ key | upper }}"
30+
{%- endfor %}
31+
printf " NUM_MESSAGES: %s\n" "$TEST_LOADGEN_NUM_MESSAGES"
32+
33+
exec freeradius -f -l stdout
3434

3535
detach: true
3636
verify:

0 commit comments

Comments
 (0)