[test-suite] r211729 - Try to be compatible with POSIX shell

Justin Bogner mail at justinbogner.com
Wed Jun 25 11:57:02 PDT 2014


Author: bogner
Date: Wed Jun 25 13:57:01 2014
New Revision: 211729

URL: http://llvm.org/viewvc/llvm-project?rev=211729&view=rev
Log:
Try to be compatible with POSIX shell

The == operator doesn't exist in POSIX's test. We aren't using globs
anyway, so simplify some uses of this to = (for strings) or -eq (for
numbers)

Modified:
    test-suite/trunk/TEST.dbg.Makefile
    test-suite/trunk/TEST.simple.Makefile

Modified: test-suite/trunk/TEST.dbg.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.dbg.Makefile?rev=211729&r1=211728&r2=211729&view=diff
==============================================================================
--- test-suite/trunk/TEST.dbg.Makefile (original)
+++ test-suite/trunk/TEST.dbg.Makefile Wed Jun 25 13:57:01 2014
@@ -39,38 +39,37 @@ Output/%.bp: %.mm Output/.dir
 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
 test.$(TEST).%: Output/%.bp Output/%.dbg Output/%.dbg.opt Output/%.native.dbg Output/%.native.dbg.opt
 	@-is_skip=0; \
-	if test "$*" == "reversefile"; then \
+	if test "$*" = "reversefile"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "spellcheck"; then \
+	if test "$*" = "spellcheck"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "sumcol"; then \
+	if test "$*" = "sumcol"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "wc"; then \
+	if test "$*" = "wc"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "wordfreq"; then \
+	if test "$*" = "wordfreq"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "exptree"; then \
+	if test "$*" = "exptree"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "ray"; then \
+	if test "$*" = "ray"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "oscar"; then \
+	if test "$*" = "oscar"; then \
 	  is_skip=1; \
 	fi; \
-	if test "$*" == "spirit"; then \
+	if test "$*" = "spirit"; then \
 	  is_skip=1; \
 	fi; \
-	if test $$is_skip == 0; then \
+	if test $$is_skip -eq 0; then \
 	  $(COLLECTOR) Output/$*.dbg Output/$*.bp Output/$*.dbg.out; \
 	  $(COLLECTOR) Output/$*.dbg.opt Output/$*.bp Output/$*.dbg.opt.out; \
 	  $(COLLECTOR) Output/$*.native.dbg Output/$*.bp Output/$*.native.dbg.out; \
 	  $(COLLECTOR) Output/$*.native.dbg.opt Output/$*.bp Output/$*.native.dbg.opt.out; \
 	  $(PROJ_SRC_ROOT)/CompareDebugInfo.py $*; \
 	fi
-

Modified: test-suite/trunk/TEST.simple.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.simple.Makefile?rev=211729&r1=211728&r2=211729&view=diff
==============================================================================
--- test-suite/trunk/TEST.simple.Makefile (original)
+++ test-suite/trunk/TEST.simple.Makefile Wed Jun 25 13:57:01 2014
@@ -37,11 +37,11 @@ Output/%.simple.exec.report.txt: Output/
 	@echo > $@
 	@-is_xfail=0; \
 	for i in $(EXEC_XFAILS); do \
-	   if test "$*" == $$i; then \
+	   if test "$*" = $$i; then \
 	     is_xfail=1; \
 	   fi; \
 	done; \
-	if test $$is_xfail == 1; then \
+	if test $$is_xfail -eq 1; then \
 	  echo "TEST-XFAIL: exec $(RELDIR)/$*" >> $@;\
 	  echo "TEST-RESULT-exec-success: xfail" >> $@;\
 	elif test -f Output/$*.exe-simple; then \





More information about the llvm-commits mailing list