(build/ninja_main.py) -> _build/oils.sh
ninja: no work to do.
total 3792
drwxr-xr-x 3 uke uke    4096 Aug  8 05:07 VERSION
-rwxr-xr-x 1 uke uke    7519 Aug  8 05:08 hello-xshar.xshar
-rw-r--r-- 1 uke uke  517187 Aug  8 05:08 oils-for-unix-0.22.0.tar.gz
-rw-r--r-- 1 uke uke 3348480 Aug  8 05:08 oils-for-unix.tar
-rw-r--r-- 1 uke uke 13482596 Aug  8 05:08 _tmp/test-oils.tar.gz
-rwxr-xr-x 1 uke uke 18213867 Aug  8 05:08 _release/test-oils.xshar

total 22M
drwxr-xr-x 3 uke uke 4.0K Aug  8 05:07 VERSION
-rwxr-xr-x 1 uke uke 7.4K Aug  8 05:08 hello-xshar.xshar
-rw-r--r-- 1 uke uke 506K Aug  8 05:08 oils-for-unix-0.22.0.tar.gz
-rw-r--r-- 1 uke uke 3.2M Aug  8 05:08 oils-for-unix.tar
-rwxr-xr-x 1 uke uke  18M Aug  8 05:08 test-oils.xshar
num_iters=1
num_shells=1
num_workloads=1
build/py.sh: line 10: stdlib/osh/bash-strict.sh: No such file or directory
stdlib/osh/byo-server.sh: line 15: stdlib/osh/two.sh: No such file or directory
  CC benchmarks/time-helper.c
/tmp/test-oils.xshar.REUSED/_tmp/oils-tar /tmp/test-oils.xshar.REUSED
/tmp/test-oils.xshar.REUSED/_tmp/oils-tar/oils-for-unix-0.22.0 /tmp/test-oils.xshar.REUSED/_tmp/oils-tar /tmp/test-oils.xshar.REUSED
./configure: Wrote _build/detected-cpp-config.h
./configure: Wrote _build/detected-config.sh
./configure: Wrote _build/detected-config.h

_build/oils.sh: Building oils-for-unix: _bin/cxx-opt-sh/oils-for-unix
_build/oils.sh: PWD = /tmp/test-oils.xshar.REUSED/_tmp/oils-tar/oils-for-unix-0.22.0

CXX _gen/bin/oils_for_unix.mycpp.cc
CXX _gen/bin/text_files.cc
CXX _gen/core/runtime.asdl.cc
CXX _gen/core/value.asdl.cc
CXX _gen/cpp/build_stamp.cc
CXX _gen/data_lang/nil8.asdl.cc
CXX _gen/display/pretty.asdl.cc
CXX _gen/frontend/arg_types.cc
CXX _gen/frontend/consts.cc
CXX _gen/frontend/help_meta.cc
CXX _gen/frontend/id_kind.asdl.cc
CXX _gen/frontend/signal.cc
CXX _gen/frontend/syntax.asdl.cc
CXX _gen/osh/arith_parse.cc
CXX _gen/ysh/grammar_tables.cc
CXX cpp/core.cc
CXX cpp/data_lang.cc
CXX cpp/fanos.cc
CXX cpp/fanos_shared.c
CXX cpp/frontend_flag_spec.cc
CXX cpp/frontend_match.cc
CXX cpp/frontend_pyreadline.cc
CXX cpp/libc.cc
CXX cpp/osh.cc
CXX cpp/osh_tdop.cc
CXX cpp/pgen2.cc
CXX cpp/pylib.cc
CXX cpp/stdlib.cc
CXX mycpp/bump_leak_heap.cc
CXX mycpp/gc_builtins.cc
CXX mycpp/gc_mops.cc
CXX mycpp/gc_mylib.cc
CXX mycpp/gc_str.cc
CXX mycpp/hash.cc
CXX mycpp/mark_sweep_heap.cc
WAIT
LINK _bin/cxx-opt-sh/oils-for-unix
    osh -> oils-for-unix
    ysh -> oils-for-unix

real	0m35.128s
user	0m53.431s
sys	0m3.418s
-rwxr-xr-x 1 uke uke 2231416 Aug  8 05:09 _bin/cxx-opt-sh/oils-for-unix.stripped

You can now run _bin/cxx-opt-sh/oils-for-unix.stripped.  Example:

+ _bin/cxx-opt-sh/oils-for-unix.stripped osh -n -c 'echo "hello $name"'
(command.Simple
  blame_tok: 
    (Token
      id: Id.Lit_Chars
      length: 4
      col: 0
      line: (SourceLine line_num:1 content:"echo \"hello $name\"" src:(source.CFlag))
    )
  more_env: []
  words: [
    (CompoundWord parts:[...0x13d6])
    (CompoundWord
      parts: [
        (DoubleQuoted
          left: (Token id:Id.Left_DoubleQuote length:1 col:5 line:...0x13de)
          parts: [
            (Token id:Id.Lit_Chars length:6 col:6 line:...0x13de)
            (SimpleVarSub
              tok: (Token id:Id.VSub_DollarName length:5 col:12 line:...0x13de)
            )
          ]
          right: (Token id:Id.Right_DoubleQuote length:1 col:17 line:...0x13de)
        )
      ]
    )
  ]
  is_last_cmd: F
)
smoke test: osh and time_.py
/tmp/test-oils.xshar.REUSED/_tmp/oils-tar /tmp/test-oils.xshar.REUSED
/tmp/test-oils.xshar.REUSED
smoke test: hi from benchmarks/osh-runtime.sh
*** 515dfb1fdba9 515dfb1fdba9 2024-08-08__05-09-05 _tmp
Published host ID to _tmp/host-id/515dfb1fdba9-556df3ee
Published shell ID to _tmp/shell-id/bash-0d7b5c2e
Published shell ID to _tmp/shell-id/dash-308ec8e6
Published shell ID to _tmp/shell-id/osh-3bfd86f5
Wrote _tmp/provenance.txt and _tmp/provenance.tsv
515dfb1fdba9	/tmp/test-oils.xshar.REUSED/_tmp/oils-tar/oils-for-unix-0.22.0/_bin/cxx-opt-sh/osh	hello-world
*** 515dfb1fdba9 /tmp/test-oils.xshar.REUSED/_tmp/oils-tar/oils-for-unix-0.22.0/_bin/cxx-opt-sh/osh hello-world 0
mkdir: created directory '/tmp/test-oils.xshar.REUSED/_tmp/osh-runtime/raw/files-0'
'_tmp/provenance.tsv' -> '_tmp/osh-runtime/raw/provenance.tsv'

Usage: test-oils.xshar ACTION FLAGS*

This is a self-extracting, executable shell archive (xshar) to test Oils.  It
contains:

  1. The oils-for-unix tarball, which can be compiled on any machine
  2. Test / benchmark scripts and their dependencies
  3. This harness, which compiles the tarball, accepts flags, runs benchmarks.

Actions:

  osh-runtime (currently the only one)

  Flags:
    -n --num-iters (default: 1)  Run everything this number of times.

    -s --num-shells              Run the first N of osh, bash, dash

    -w --num-workloads           Run the first N of the workloads

    -u --upload                  Upload .wwz results to the CI server

    --subdir                     Subdirectory for the wwz. results
                                 default: git-$commit

    --url                        Upload to this URL
                                 default: http://travis-ci.oilshell.org/wwup.cgi

    --dry-run                    Print out tasks, but don't execute them

  Workloads:
    hello-world
    bin-true
    configure.cpython
    configure.util-linux
    configure.ocaml
    configure.tcc
    configure.yash
    abuild-print-help

Example:

  test-oils.xshar osh-runtime --num-iters 2 --num-shells 2 --num-workloads 3

will run this benchmark matrix 2 times:

  (osh, bash) X (hello-world, bin-true, configure-cpython)

xshar runtime dependencies:

  - base64, tar, gzip - for unpacking the payload

osh-runtime dependencies:

  - C++ compiler, for oils-for-unix and benchmarks/time-helper.c
    - On OS X, the compiler comes with XCode
  - python2 for - benchmarks/time_.py, tsv*.py, gc_stats*.py
  - zip for creating the .wwz payload
  - curl for uploading it via HTTP
test-oils.xshar was built from git commit 59ece78259d0eeed24d1f7b51aeec952c365becd