Skip to content

Commit a948401

Browse files
committed
fix(cli): fix prereq_yml test on mac
This fix will resolve apache/openserverless#46
1 parent 2d98437 commit a948401

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/prereq_yml.bats

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,38 @@ setup() {
2828
OS=linux ARCH=amd64
2929
mkdir -p _bin/$OS-$ARCH
3030
run env __OS=$OS __ARCH=$ARCH task -t prereq/olaris/prereq.yml -d _bin/$OS-$ARCH all
31-
find _bin/$OS-$ARCH -type f | xargs file | grep ELF | grep x86-64 | wc -l | tee _count
31+
find _bin/$OS-$ARCH -type f | xargs file | grep ELF | grep x86-64 | wc -l | xargs | tee _count
3232
assert_equal "$(cat _count)" $COUNT
3333
}
3434

3535
@test "OS=linux ARCH=arm64" {
3636
OS=linux ARCH=arm64
3737
mkdir -p _bin/$OS-$ARCH
3838
run env __OS=$OS __ARCH=$ARCH task -t prereq/olaris/prereq.yml -d _bin/$OS-$ARCH all
39-
find _bin/$OS-$ARCH | xargs file | grep ELF | grep ARM | wc -l | tee _count
39+
find _bin/$OS-$ARCH -type f | xargs file | grep ELF | grep ARM | wc -l | xargs | tee _count
4040
assert_equal "$(cat _count)" $COUNT
4141
}
4242

4343
@test "OS=darwin ARCH=amd64" {
4444
OS=darwin ARCH=amd64
4545
mkdir -p _bin/$OS-$ARCH
4646
run env __OS=$OS __ARCH=$ARCH task -t prereq/olaris/prereq.yml -d _bin/$OS-$ARCH all
47-
find _bin/$OS-$ARCH | xargs file | grep Mach-O | grep x86_64 | wc -l | tee _count
47+
find _bin/$OS-$ARCH -type f | xargs file | head -n 1 | grep Mach-O | grep x86_64 | wc -l | xargs | tee _count
4848
assert_equal "$(cat _count)" $COUNT
4949
}
5050

5151
@test "OS=darwin ARCH=arm64" {
5252
OS=darwin ARCH=arm64
5353
mkdir -p _bin/$OS-$ARCH
5454
run env __OS=$OS __ARCH=$ARCH task -t prereq/olaris/prereq.yml -d _bin/$OS-$ARCH all
55-
find _bin/$OS-$ARCH | xargs file | grep Mach-O | grep arm64 | wc -l | tee _count
55+
find _bin/$OS-$ARCH -type f | xargs file | head -n 1 | grep Mach-O | grep arm64 | wc -l | xargs | tee _count
5656
assert_equal "$(cat _count)" $COUNT
5757
}
5858

5959
@test "OS=windows ARCH=amd64" {
6060
OS=windows ARCH=amd64
6161
mkdir -p _bin/$OS-$ARCH
6262
run env __OS=$OS __ARCH=$ARCH task -t prereq/olaris/prereq.yml -d _bin/$OS-$ARCH __OS=$OS __ARCH=$ARCH all
63-
find _bin/$OS-$ARCH | xargs file | grep PE32 | wc -l | tee _count
63+
find _bin/$OS-$ARCH -type f | xargs file | grep PE32 | wc -l | xargs | tee _count
6464
assert_equal "$(cat _count)" $COUNT
6565
}

0 commit comments

Comments
 (0)