1 | #!/usr/bin/env bash
|
2 | #
|
3 | # Usage:
|
4 | # benchmarks/id-test.sh <function name>
|
5 |
|
6 | : ${LIB_OSH=stdlib/osh}
|
7 | source $LIB_OSH/bash-strict.sh
|
8 | source $LIB_OSH/no-quotes.sh
|
9 |
|
10 | source benchmarks/id.sh
|
11 | source test/common.sh # run-test-funcs
|
12 |
|
13 | test-shell-prov() {
|
14 | shell-provenance-2 no-host 2022-12-29 _tmp/ \
|
15 | bin/osh
|
16 | }
|
17 |
|
18 | test-out-param() {
|
19 | local mylocal
|
20 |
|
21 | out-param mylocal
|
22 | nq-assert "$mylocal" = 'returned'
|
23 |
|
24 | echo "mylocal=$mylocal"
|
25 | }
|
26 |
|
27 | test-compiler-id() {
|
28 | dump-compiler-id $(which gcc)
|
29 |
|
30 | if test -f $CLANG; then
|
31 | dump-compiler-id $CLANG
|
32 | fi
|
33 |
|
34 | head _tmp/compiler-id/*/version.txt
|
35 | }
|
36 |
|
37 | soil-run() {
|
38 | run-test-funcs
|
39 | }
|
40 |
|
41 | "$@"
|