diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-09-13 14:35:29 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-09-13 11:12:41 +0200 |
commit | 6f2db0e34b5aeeba8d303b8bd82e947a2daa9303 (patch) | |
tree | 688e05eb301dab3205a7a1872932fe813f6e4c26 /test/lib | |
parent | 4e9b50f7b653c497b148b0f82260936519bf1337 (diff) | |
download | passt-6f2db0e34b5aeeba8d303b8bd82e947a2daa9303.tar passt-6f2db0e34b5aeeba8d303b8bd82e947a2daa9303.tar.gz passt-6f2db0e34b5aeeba8d303b8bd82e947a2daa9303.tar.bz2 passt-6f2db0e34b5aeeba8d303b8bd82e947a2daa9303.tar.lz passt-6f2db0e34b5aeeba8d303b8bd82e947a2daa9303.tar.xz passt-6f2db0e34b5aeeba8d303b8bd82e947a2daa9303.tar.zst passt-6f2db0e34b5aeeba8d303b8bd82e947a2daa9303.zip |
test: Move perf.js report file to $LOGDIR/web
The tests generate a performance report in $BASEPATH/perf.js and
hooks/pre-push copies it to the website. To avoid cluttering the working
directory, instead put perf.js in $LOGDIR/web, since it's a test output
artefact. Update hooks/pre-push to copy from its new location.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/lib')
-rwxr-xr-x | test/lib/perf_report | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lib/perf_report b/test/lib/perf_report index b4fa685..8fd0588 100755 --- a/test/lib/perf_report +++ b/test/lib/perf_report @@ -14,7 +14,7 @@ # Author: Stefano Brivio <sbrivio@redhat.com> PERF_LINK_COUNT=0 -PERF_JS="${BASEPATH}/perf.js" +PERF_JS="${LOGDIR}/web/perf.js" PERF_TEMPLATE_HTML="document.write('"' Throughput in Gbps, latency in µs. Threads are <span style="font-family: monospace;">iperf3</span> processes, <i>passt</i> and <i>pasta</i> are currently single-threaded.<br/> @@ -126,6 +126,7 @@ for (var i = 0; i < perf_links.length; i++) { # perf_init() - Process first part of template perf_init() { + mkdir -p "$(dirname "${PERF_JS}")" echo "${PERF_TEMPLATE_HTML}" > "${PERF_JS}" perf_report_sub commit "$(echo ${COMMIT} | sed "s/'/\\\'/g")" } |