Skip to content

Commit

Permalink
tests: Avoid extra dependency on bc
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Faria <[email protected]>
  • Loading branch information
albertofaria committed Apr 22, 2024
1 parent a75b65a commit 3d99ddc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set -o errexit -o pipefail -o nounset

start_time="$( date +%s.%N )"
start_time="$( date +%s%N )"

env_image_base=quay.io/containerdisks/fedora:39
env_image=quay.io/crun-vm/test-env:latest
Expand Down Expand Up @@ -63,7 +63,8 @@ COMMANDS

# Usage: __elapsed
__elapsed() {
bc -l <<< "$( date +%s.%N ) - ${start_time}"
# shellcheck disable=SC2001
sed 's/\(.\{9\}\)$/.\1/' <<< "$(( $( date +%s%N ) - start_time ))"
}

# Usage: __small_log_without_time <color> <format> <args...>
Expand Down Expand Up @@ -168,7 +169,6 @@ build)
__exec sudo dnf update -y
__exec sudo dnf install -y \
bash \
bc \
coreutils \
crun \
docker \
Expand Down

0 comments on commit 3d99ddc

Please sign in to comment.