OILS / benchmarks / id-test.sh View on Github | oils.pub

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