View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -10,16 +10,15 @@ set -o errexit
source test/common.sh
process-file() {
local proj=$1
local rel_path=$1
local abs_path=$2
local rel_path=$3
local raw_base=_tmp/wild/raw/$proj/$rel_path
local www_base=_tmp/wild/www/$proj/$rel_path
local raw_base=_tmp/wild/raw/$rel_path
local www_base=_tmp/wild/www/$rel_path
mkdir -p $(dirname $raw_base)
mkdir -p $(dirname $www_base)
log "--- Processing $proj - $rel_path"
log "--- Processing $rel_path"
# Count the number of lines. This creates a tiny file, but we're doing
# everything involving $abs_path at once so it's in the FS cache.
@@ -52,7 +51,7 @@ readonly MANIFEST=_tmp/wild/MANIFEST.txt
parse-in-parallel() {
local failed=''
xargs -n 3 -P $JOBS -- $0 process-file || failed=1
xargs -n 2 -P $JOBS -- $0 process-file || failed=1
# Limit the output depth
tree -L 3 _tmp/wild
@@ -65,7 +64,8 @@ parse-and-report() {
local manifest_regex=${1:-} # egrep regex for manifest line
time {
test/wild.sh write-manifest
#test/wild.sh write-manifest
test/wild.sh manifest-from-archive
if test -n "$manifest_regex"; then
egrep -- "$manifest_regex" $MANIFEST | parse-in-parallel
@@ -77,8 +77,10 @@ parse-and-report() {
}
}
# NOTE: This depends on test/jsontemplate.py. Should we make that part of
# 'deps'?
wild-report() {
PYTHONPATH=~/hg/json-template/python test/wild_report.py "$@"
test/wild_report.py "$@"
}
_link() {
View
@@ -443,6 +443,26 @@ make-archive() {
ls -l $out
}
# Fetch the archive we published.
fetch-archive() {
local dir=_tmp/wild
mkdir -p $dir
wget --directory $dir --no-clobber \
https://www.oilshell.org/blob/wild/wild-source.tar.gz
}
extract-archive() {
local out=_tmp/wild/src
mkdir -p $out
tar --extract -z --directory $out < _tmp/wild/wild-source.tar.gz
}
# This is opposed to crawling the file system with 'find'.
manifest-from-archive() {
# relative path then absolute path
find _tmp/wild/src -type f -a -printf '%P %p\n' > $MANIFEST
}
# 442K lines without "big" and without ltmain.sh
# TODO: Include a few ltmain.sh. Have to de-dupe them.
#
View
@@ -537,7 +537,7 @@ def main(argv):
# Collect work into dirs
for line in sys.stdin:
#d = line.strip()
proj, abs_path, rel_path = line.split()
rel_path, abs_path = line.split()
#print proj, '-', abs_path, '-', rel_path
def _ReadTaskFile(path):
@@ -552,7 +552,7 @@ def _ReadTaskFile(path):
num_failed = 1 if int(status) >= 1 else 0
return num_failed, float(secs)
raw_base = os.path.join('_tmp/wild/raw', proj, rel_path)
raw_base = os.path.join('_tmp/wild/raw', rel_path)
st = {}
# TODO:
@@ -580,7 +580,7 @@ def _ReadTaskFile(path):
st['num_files'] = 1
path_parts = proj.split('/') + rel_path.split('/')
path_parts = rel_path.split('/')
#print path_parts
UpdateNodes(root_node, path_parts, st)