[COMMIT osv master] tests: fix shell if/else syntax to make it work on both Ubuntu and Fedora

5 views
Skip to first unread message

Commit Bot

unread,
Jul 21, 2020, 5:48:57 PM7/21/20
to osv...@googlegroups.com, Waldemar Kozaczuk
From: Waldemar Kozaczuk <jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <jwkoz...@gmail.com>
Branch: master

tests: fix shell if/else syntax to make it work on both Ubuntu and Fedora

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>

---
diff --git a/modules/tests/Makefile b/modules/tests/Makefile
--- a/modules/tests/Makefile
+++ b/modules/tests/Makefile
@@ -300,7 +300,7 @@ build_all_tests: $(all_tests:%=$(out)/%)
usr.manifest: build_all_tests $(lastword $(MAKEFILE_LIST)) usr.manifest.skel FORCE
@echo " generating modules/tests/usr.manifest"
@cat $@.skel > $@
- @if [ $(arch) == x64 ]; then \
+ @if [ "$(arch)" = "x64" ]; then \
ldd $(addprefix $(out)/tests/,$(boost-tests)) | grep libboost | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/usr\/lib\/\1: \2/' | sort | uniq >> $@; \
else \
./add_aarch64_boost_libraries.sh $(OSV_BASE) >> $@; \
@@ -314,7 +314,7 @@ FORCE:
common.manifest: build_all_tests $(lastword $(MAKEFILE_LIST)) usr.manifest.skel FORCE
@echo " generating modules/tests/common.manifest"
@cat usr.manifest.skel > $@
- @if [ $(arch) == x64 ]; then \
+ @if [ "$(arch)" = "x64" ]; then \
ldd $(addprefix $(out)/tests/,$(boost-tests)) | grep libboost | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/usr\/lib\/\1: \2/' | sort | uniq >> $@; \
else \
./add_aarch64_boost_libraries.sh $(OSV_BASE) >> $@; \
Reply all
Reply to author
Forward
0 new messages