File: entrypoint.sh

package info (click to toggle)
libtoxcore 0.2.20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,124 kB
  • sloc: ansic: 75,034; cpp: 4,933; sh: 1,115; python: 651; makefile: 329; perl: 39
file content (23 lines) | stat: -rwxr-xr-x 700 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

set -eux

TEST=${1:-conference_test}
OUTPUT="/work/c-toxcore/test.perf"

readarray -t FLAGS <<<"$(pkg-config --cflags --libs libsodium opus vpx | sed -e 's/ /\n/g')"
readarray -t SRCS <<<"$(find /work/c-toxcore/tox* -name "*.c")"

gcc -pthread -g \
  -o "/work/$TEST" -O3 -fno-omit-frame-pointer \
  "${SRCS[@]}" \
  /work/c-toxcore/auto_tests/auto_test_support.c \
  /work/c-toxcore/testing/misc_tools.c \
  "/work/c-toxcore/auto_tests/$TEST.c" \
  -DMIN_LOGGER_LEVEL=LOGGER_LEVEL_TRACE \
  "${FLAGS[@]}"

time perf record -g --call-graph dwarf --freq=max "/work/$TEST" /work/c-toxcore/auto_tests/
perf report | head -n50
perf script -F +pid >"$OUTPUT"
chown 1000:100 "$OUTPUT"