OILS / build / old-ovm-test.sh View on Github | oilshell.org

42 lines, 25 significant
1#!/usr/bin/env bash
2#
3# Usage:
4# build/old-ovm-test.sh <function name>
5
6set -o nounset
7set -o pipefail
8set -o errexit
9shopt -s strict:all 2>/dev/null || true # dogfood for OSH
10
11test-oil-bundle() {
12 make _bin/oil.ovm
13 _bin/oil.ovm osh -c 'echo hi'
14 ln -s -f oil.ovm _bin/osh
15 _bin/osh -c 'echo hi from osh'
16}
17
18# Test the different entry points.
19ovm-main-func() {
20 echo ---
21 echo 'Running nothing'
22 echo ---
23 local ovm=_build/hello/ovm-dbg
24
25 _OVM_RUN_SELF=0 $ovm || true
26
27 echo ---
28 echo 'Running bytecode.zip'
29 echo ---
30
31 _OVM_RUN_SELF=0 $ovm _build/hello/bytecode.zip || true
32
33 # Doesn't work because of stdlib deps?
34 echo ---
35 echo 'Running lib.pyc'
36 echo ---
37
38 _OVM_RUN_SELF=0 $ovm build/testdata/lib.pyc
39
40}
41
42"$@"