Skip to content

Commit

Permalink
[test/wild] Fix PYTHONPATH
Browse files Browse the repository at this point in the history
To import from vendor/
  • Loading branch information
Andy C committed Mar 6, 2024
1 parent 80a105d commit 470b479
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions test/wild-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ shopt -s strict:all 2>/dev/null || true # dogfood for OSH

source test/common.sh # $OSH, log

REPO_ROOT=$(cd "$(dirname $0)/.."; pwd)

dump-html-and-translate-file() {
local rel_path=$1
local abs_path=$2
Expand Down Expand Up @@ -112,22 +114,6 @@ filter-manifest() {
fi
}

# Takes 3m 47s on 7 cores for 513K lines.
# So that's like 230 seconds or so. It should really take 1 second!

parse-and-report() {
local manifest_regex=${1:-} # egrep regex for manifest line
local func=${2:-dump-html-and-translate-file}

time {
#test/wild.sh write-manifest
test/wild.sh manifest-from-archive

filter-manifest "$manifest_regex" | parse-in-parallel $func
make-report "$manifest_regex"
}
}

dump-text-asts() {
local manifest_regex=${1:-} # egrep regex for manifest line

Expand Down Expand Up @@ -163,10 +149,8 @@ compare-asts() {
cat $manifest | xargs -n 1 -- $0 compare-one-ast
}

# NOTE: This depends on test/jsontemplate.py. Should we make that part of
# 'deps'?
wild-report() {
test/wild_report.py "$@"
PYTHONPATH=$REPO_ROOT $REPO_ROOT/test/wild_report.py "$@"
}

_link() {
Expand Down Expand Up @@ -199,6 +183,22 @@ make-report() {
_link $PWD/web _tmp
}

# Takes 3m 47s on 7 cores for 513K lines.
# So that's like 230 seconds or so. It should really take 1 second!

parse-and-report() {
local manifest_regex=${1:-} # egrep regex for manifest line
local func=${2:-dump-html-and-translate-file}

time {
#test/wild.sh write-manifest
test/wild.sh manifest-from-archive

filter-manifest "$manifest_regex" | parse-in-parallel $func
make-report "$manifest_regex"
}
}

if test "$(basename $0)" = 'wild-runner.sh'; then
"$@"
fi

0 comments on commit 470b479

Please sign in to comment.