❯ task itest T=prereq_yml
task: Task "bats" is up to date
task: [itest] rm -Rf ~/.ops/olaris
task: [itest] if test -z "prereq_yml"
then bats/bin/bats .
else bats/bin/bats prereq_yml.bats
fi
prereq_yml.bats
✗ OS=linux ARCH=amd64
(from function `assert_equal' in file test_helper/bats-assert/src/assert_equal.bash, line 40,
in test file prereq_yml.bats, line 32)
`assert_equal "$(cat _count)" $COUNT' failed
1
-- values do not equal --
expected : 1
actual : 1
--
✗ OS=linux ARCH=arm64
(from function `assert_equal' in file test_helper/bats-assert/src/assert_equal.bash, line 40,
in test file prereq_yml.bats, line 40)
`assert_equal "$(cat _count)" $COUNT' failed
1
-- values do not equal --
expected : 1
actual : 1
--
✗ OS=darwin ARCH=amd64
(from function `assert_equal' in file test_helper/bats-assert/src/assert_equal.bash, line 40,
in test file prereq_yml.bats, line 48)
`assert_equal "$(cat _count)" $COUNT' failed
2
-- values do not equal --
expected : 1
actual : 2
--
✗ OS=darwin ARCH=arm64
(from function `assert_equal' in file test_helper/bats-assert/src/assert_equal.bash, line 40,
in test file prereq_yml.bats, line 56)
`assert_equal "$(cat _count)" $COUNT' failed
3
-- values do not equal --
expected : 1
actual : 3
--
✗ OS=windows ARCH=amd64
(from function `assert_equal' in file test_helper/bats-assert/src/assert_equal.bash, line 40,
in test file prereq_yml.bats, line 64)
`assert_equal "$(cat _count)" $COUNT' failed
1
-- values do not equal --
expected : 1
actual : 1
--
5 tests, 5 failures
task: Failed to run task "itest": exit status 1
After a preliminary analysis it seems that there are two small "bugs":
1) the _count contains a string with spaces while the $COUNT contains 1 without spaces
2) on macos the 7zz executable is multi-arch binary, so the _count will contain 2 instead of 1 because of the grep expression.
In fact, while on linux platform the file command will return 1 line for multi-arch binaries.
On macos arm64 the test fails.
After a preliminary analysis it seems that there are two small "bugs": 1) the _count contains a string with spaces while the $COUNT contains 1 without spaces 2) on macos the 7zz executable is multi-arch binary, so the _count will contain 2 instead of 1 because of the grep expression.
In fact, while on linux platform the
file
command will return 1 line for multi-arch binaries.