| 1 |
#!/usr/bin/env bash |
| 2 |
# |
| 3 |
# Copyright IBM Corp. 2017 |
| 4 |
# |
| 5 |
# Usage: testsuite_init |
| 6 |
# |
| 7 |
# Announce start of test suite and prepare log files. |
| 8 |
# |
| 9 |
|
| 10 |
TOPDIR=$(readlink -f $(dirname $0)/..) && test -d "$TOPDIR"\ |
| 11 |
&& source "$TOPDIR/bin/common" |
| 12 |
|
| 13 |
printf "${BOLD}Starting tests${RESET}\n" |
| 14 |
echo "start_time $(date +%s.%N)" >"$COUNTFILE" |
| 15 |
exec >"$LOGFILE" 2>&1 |
| 16 |
|
| 17 |
t_detail "DATE" "$(t_timestamp)" |
| 18 |
|
| 19 |
t_detail "LCOV" "" |
| 20 |
lcov --version 2>&1 | t_indent |
| 21 |
|
| 22 |
t_detail "GCOV" "" |
| 23 |
gcov --version 2>&1 | t_indent |
| 24 |
|
| 25 |
case "$OSTYPE" in |
| 26 |
linux*) |
| 27 |
t_detail "CPUINFO" "" |
| 28 |
t_indent < /proc/cpuinfo |
| 29 |
|
| 30 |
t_detail "MEMINFO" "" |
| 31 |
t_indent < /proc/meminfo |
| 32 |
;; |
| 33 |
darwin*) |
| 34 |
t_detail "CPUINFO" "" |
| 35 |
sysctl machdep.cpu | t_indent |
| 36 |
|
| 37 |
t_detail "MEMINFO" "" |
| 38 |
vm_stat | t_indent |
| 39 |
;; |
| 40 |
*) |
| 41 |
t_detail "CPUINFO" "" |
| 42 |
echo "unknown cpu info" | t_indent |
| 43 |
|
| 44 |
t_detail "MEMINFO" "" |
| 45 |
echo "unknown mem info" | t_indent |
| 46 |
;; |
| 47 |
esac |