Skip to content

Commit

Permalink
Tweaks to wild tests and spec tests.
Browse files Browse the repository at this point in the history
The wild tests parse more than a million lines of shell scripts now:

- shflags.
  - There are three instances of 'readonly $var' not parsing.
- shell scripts in GNU coreutils/glibc/grep/binutils.
  - The only problems are 2 scripts that have Lisp code after "exit".

Cosmetic changes:

- Remove lines per second in wild test columns.  Keep it in the summary.
- For consistency, use test/spec/index.html instead of RESULTS.html.
  • Loading branch information
Andy Chu committed Nov 7, 2017
1 parent 5395173 commit 538b1f2
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
12 changes: 6 additions & 6 deletions doc/release-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ Oil Version 0.2.alpha1

### Links

- [Spec Test Results](test/spec.wwz/RESULTS.html). OSH behavior is tested against
the behavior of existing shells.
- [Wild Test Results](test/wild.wwz/). Parsing thousands of shell scripts
with OSH.
- [OSH Parser Performance](benchmarks/osh-parser.wwz/). How fast does OSH parse
shell scripts?
- [Spec Test Results](test/spec.wwz/). Test OSH behavior against
that of existing shells.
- [Wild Test Results](test/wild.wwz/). Parsing and translating thousands of
shell scripts with OSH.
- [OSH Parser Performance](benchmarks/osh-parser.wwz/). How fast does OSH
parse?
- [Line Counts](metrics/line-counts.wwz/). How much code is in Oil?

<!-- TODO:
Expand Down
4 changes: 2 additions & 2 deletions test/spec-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ EOF
}

html-summary() {
_html-summary > _tmp/spec/RESULTS.html
_html-summary > _tmp/spec/index.html

echo
echo "Results: file://$PWD/_tmp/spec/RESULTS.html"
echo "Results: file://$PWD/_tmp/spec/index.html"
}

link-web() {
Expand Down
20 changes: 20 additions & 0 deletions test/wild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ all-manifests() {
\( -name .git -a -prune \) -o \
\( -type f -a -executable -a -printf '%P\n' \) )

src=~/git/wild/shell/shflags
_manifest "shell/$(basename $src)" $src \
$(find $src \
'(' -name .git -a -prune ')' -o \
'(' -name '*.sh' -o \
-name shflags -o -name shlib -o -name shunit2 -o -name versions \
')' -a -printf '%P\n')

_sh-manifest ~/git/other/modernish shell
_sh-manifest ~/git/other/posixcube shell

Expand Down Expand Up @@ -185,6 +193,18 @@ all-manifests() {
$(find $src '(' -name debootstrap -o -name functions ')' -a -printf '%P\n') \
$(find $src/scripts -type f -a -printf 'scripts/%P\n')

src=~/src/grep-2.24
_sh-manifest $src gnu

src=~/src/coreutils-8.22
_sh-manifest $src gnu

src=~/src/glibc-2.23
_sh-manifest $src gnu

src=~/src/binutils-2.26
_sh-manifest $src gnu

#
# Operating Systems
#
Expand Down
8 changes: 0 additions & 8 deletions test/wild_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def MakeHtmlGroup(title_str, body_str):
<td>Parse Failures</td>
<td>Max Parse Time (secs)</td>
<td>Total Parse Time (secs)</td>
<td>Parsed Lines/sec</td>
<td>Translation Failures</td>
<td class="name">Directory</td>
</tr>
Expand All @@ -176,7 +175,6 @@ def MakeHtmlGroup(title_str, body_str):
{.end}
<td>{max_parse_secs}</td>
<td>{parse_proc_secs}</td>
<td>{lines_per_sec}</td>
{.osh2oil_failed?}
<!-- <td class="fail">{osh2oil_failed|commas}</td> -->
Expand Down Expand Up @@ -216,8 +214,6 @@ def MakeHtmlGroup(title_str, body_str):
<td>Lines</td>
<td>Parsed?</td>
<td>Parse Process Time (secs)</td>
<td>Internal Parse Time (secs)</td>
<td>Parsed Lines/sec</td>
<td>Translated?</td>
<td class="name">Filename</td>
</tr>
Expand All @@ -233,13 +229,9 @@ def MakeHtmlGroup(title_str, body_str):
{.parse_failed?}
<a class="fail" href="#stderr_parse_{name}">FAIL</a>
<td>{parse_proc_secs}</td>
<td>-</td>
<td>-</td>
{.or}
<a class="ok" href="{name}__ast.html">OK</a>
<td>{parse_proc_secs}</td>
<td>{parse_proc_secs}</td>
<td>{lines_per_sec}</td>
{.end}
</td>
Expand Down
2 changes: 1 addition & 1 deletion web/osh-to-oil.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<body onload="onLoad(location.hash, globals, kStatusElem);"
onhashchange="onHashChange(location.hash, globals, kStatusElem);">

<p>Up to <a href="listing.html">WILD/</a></p>
<p>Up to <a href="index.html">WILD/</a></p>

<p id="status"></p>

Expand Down

0 comments on commit 538b1f2

Please sign in to comment.