Skip to content

Commit

Permalink
tests/test_runner.sh: remove some redundancies
Browse files Browse the repository at this point in the history
This wrapper doesn't need to load anything from helpers.bash, because
the various .bats files already do so on their own.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
  • Loading branch information
nalind committed Oct 18, 2024
1 parent 3fed79c commit 2f978d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions rpm/buildah.spec
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export BUILDTAGS+=" btrfs_noversion exclude_graphdriver_btrfs"
%gobuild -o bin/imgtype ./tests/imgtype
%gobuild -o bin/copy ./tests/copy
%gobuild -o bin/tutorial ./tests/tutorial
%gobuild -o bin/inet ./tests/inet
%{__make} docs

%install
Expand Down
1 change: 1 addition & 0 deletions tests/inet/inet.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func main() {
cmd := exec.Command(args[0], args[1:]...)
cmd.Stdin = stdinReader
cmd.Stdout = stdoutWriter
cmd.Stderr = os.Stderr
if err := cmd.Start(); err != nil {
logrus.Errorf("starting %v: %v", args, err)
closeCloser(stdinReader)
Expand Down
8 changes: 1 addition & 7 deletions tests/test_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
# labels than /tmp, which is often on tmpfs.
export TMPDIR=${TMPDIR:-/var/tmp}

# Load the helpers.
. helpers.bash

function execute() {
>&2 echo "++ $@"
eval "$@"
}

# Tests to run. Defaults to all.
TESTS=${@:-.}

# Run the tests.
execute time bats --tap $TESTS
execute time bats --tap "${@:-.}"

0 comments on commit 2f978d2

Please sign in to comment.