Permalink
Browse files

Add osh2oil errors to the FAILED.html output of test/wild.sh

Add TODO in osh2oil.py.  Parts of the language have changed.
  • Loading branch information...
Andy Chu
Andy Chu committed Jul 28, 2017
1 parent 61ba42d commit 287839240b5b6be7040ac3134ab77bde3b7fce5a
Showing with 17 additions and 3 deletions.
  1. +15 −3 test/wild.sh
  2. +2 −0 tools/osh2oil.py
View
@@ -117,18 +117,30 @@ _parse-and-copy-one() {
EOF
log "*** Failed to parse $rel_path"
return 1
return 1 # no point in continuing
fi
#rm ${output}__err.txt
if ! _osh-html-one $input $output; then # Convert to HTML AST
log "*** Failed to convert $input to AST"
return 1
return 1 # no point in continuing
fi
if ! _osh-to-oil-one $input $output; then # Convert to Oil
# Append
cat >>$dest_base/FAILED.html <<EOF
<a href="$rel_path.txt">$rel_path.txt</a>
<a href="${rel_path}__osh-to-oil-err.txt">${rel_path}__osh-to-oil-err.txt</a>
<a href="$rel_path.oil.txt">$rel_path.oil.txt</a>
<br/>
<pre>
$(cat ${output}__osh-to-oil-err.txt)
</pre>
<hr/>
EOF
log "*** Failed to convert $input to Oil"
return 1
return 1 # failed
fi
}
View
@@ -1,6 +1,8 @@
from __future__ import print_function
"""
fix.py -- Do source transformations. Somewhat like 'go fix'.
TODO: Change := to =, and var/const/set
"""
import sys

0 comments on commit 2878392

Please sign in to comment.