Skip to content

Commit

Permalink
[spec/redirect] Work around flakiness.
Browse files Browse the repository at this point in the history
This is issue #330.  For some reason mksh started being flaky in
parallel ('osh-all'), but not when run serially on its own.

[build] Get rid of /../ in path.

This caused the ovm-build benchmark to fail for some unknown reason.
  • Loading branch information
Andy Chu committed Nov 18, 2020
1 parent e0c7b1d commit 98c2e57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ set -o errexit
#
# TODO: It would be much nicer to export a FUNCTION "cxx" rather than a
# variable $CXX.
_THIS_DIR=$(dirname ${BASH_SOURCE[0]})
_THIS_DIR=$(dirname ${BASH_SOURCE[0]}) # oilshell/oil/build/ dir
readonly _THIS_DIR
_REPO_ROOT=$(cd $THIS_DIR/.. && pwd) # oilshell/oil
readonly _REPO_ROOT

# TODO: This changes depending on the version. Maybe there should be a 'clang'
# function for things that really require clang, like code coverage and so
# forth.
readonly CLANG_DIR_RELATIVE='_deps/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-16.04'
readonly CLANG_DIR=$_THIS_DIR/../$CLANG_DIR_RELATIVE
readonly CLANG_DIR=$_REPO_ROOT/$CLANG_DIR_RELATIVE
readonly CLANG=$CLANG_DIR/bin/clang
readonly CLANGXX=$CLANG_DIR/bin/clang++

Expand Down
9 changes: 7 additions & 2 deletions spec/redirect.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,13 @@ true 9> "$TMP/fd.txt"
cat "$TMP/fd.txt"
## stdout-json: ""

#### : 3>&3 (OSH regression)
: 3>&3
#### : 4>&4 (OSH regression)

# Note: This used to be 3>&3 except on the 0.8.5 release it was flaky under
# mksh only? Reproducible with test/spec.sh osh-all, but not test/spec.sh
# redirect. Very weird.

: 4>&4
echo hello
## stdout: hello
## BUG mksh stdout-json: ""
Expand Down

0 comments on commit 98c2e57

Please sign in to comment.