Skip to content

Commit

Permalink
[test/wild] Summarize failures at the top level, in text and HTML.
Browse files Browse the repository at this point in the history
The text can be used as a starting point for --not-shell and --not-osh.

- Write version text, like test/spec.sh does.
  - Extracted a function into test/common.sh and added an include guard.
- Add flags, as well as explicit input and output directories
  • Loading branch information
Andy Chu committed Aug 31, 2018
1 parent 3abe2cc commit e951de1
Show file tree
Hide file tree
Showing 5 changed files with 325 additions and 155 deletions.
21 changes: 20 additions & 1 deletion test/common.sh
@@ -1,7 +1,12 @@
#!/bin/bash
#
# Usage:
# ./common.sh <function name>
# source test/common.sh

# Include guard.
test -n "${__TEST_COMMON_SH:-}" && return
readonly __TEST_COMMON_SH=1


# TODO: Remove/rename this. The release process might use the release binary
# instead of this dev binary. test/spec.sh already has its own scheme.
Expand Down Expand Up @@ -91,6 +96,20 @@ run-other-suite-for-release() {
fi
}

date-and-git-info() {
date
echo

if test -d .git; then
local branch=$(git rev-parse --abbrev-ref HEAD)
local hash=$(git rev-parse $branch)
echo "oil repo: $hash on branch $branch"
else
echo "(not running from git repository)"
fi
echo
}

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

0 comments on commit e951de1

Please sign in to comment.