shithub: scc

Download patch

ref: bfe0cd5f5e1638f05262642281f895a703008422
parent: 27b4662757e3d9a500b69a96057cef8fdeacca99
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Aug 22 14:49:09 EDT 2018

[tests] Simplify the test directories

diff: cannot open a/tests/ar/error//null: file does not exist: 'a/tests/ar/error//null'
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -3,7 +3,11 @@
 PROJECTDIR = ..
 include $(PROJECTDIR)/rules.mk
 
-DIRS=ar nm as
+DIRS=ar/execute \
+     nm/execute \
+     as/execute \
+     libc/execute \
+     scc/execute scc/error
 
 all clean:
 	$(FORALL)
--- a/tests/ar/Makefile
+++ /dev/null
@@ -1,9 +1,0 @@
-.POSIX:
-
-PROJECTDIR = ../..
-include $(PROJECTDIR)/rules.mk
-
-DIRS=error execute
-
-all clean:
-	$(FORALL)
--- a/tests/ar/error/Makefile
+++ /dev/null
@@ -1,3 +1,0 @@
-.POSIX:
-
-all clean:
--- a/tests/ar/execute/Makefile
+++ b/tests/ar/execute/Makefile
@@ -1,12 +1,12 @@
 .POSIX:
 
 PROJECTDIR=$$PWD/../../../
-ROOTDIR=$(PROJECTDIR)/rootdir
+ROOT=$(PROJECTDIR)/rootdir
 
 all: tests
 
 tests: master.a
-	PATH=$(ROOTDIR)/bin:$$PATH ./chktest.sh
+	PATH=$(ROOT)/bin:$$PATH ./chktest.sh
 
 master.a:
 	./mkmaster.sh
--- a/tests/as/Makefile
+++ /dev/null
@@ -1,9 +1,0 @@
-.POSIX:
-
-PROJECTDIR = ../..
-include $(PROJECTDIR)/rules.mk
-
-DIRS=execute
-
-all clean:
-	$(FORALL)
--- a/tests/as/execute/Makefile
+++ b/tests/as/execute/Makefile
@@ -1,12 +1,12 @@
 .POSIX:
 
 PROJECTDIR=$$PWD/../../../
-ROOTDIR=$(PROJECTDIR)/rootdir
+ROOT=$(PROJECTDIR)/rootdir
 
 all: tests
 
 tests:
-	PATH=$(ROOTDIR)/bin:$$PATH ./chktest.sh
+	PATH=$(ROOT)/bin:$$PATH ./chktest.sh
 
 clean:
 	rm -f test.log
--- a/tests/nm/Makefile
+++ /dev/null
@@ -1,9 +1,0 @@
-.POSIX:
-
-PROJECTDIR = ../..
-include $(PROJECTDIR)/rules.mk
-
-DIRS=execute
-
-all clean:
-	$(FORALL)
--- a/tests/nm/execute/Makefile
+++ b/tests/nm/execute/Makefile
@@ -1,7 +1,7 @@
 .POSIX:
 
 PROJECTDIR=$$PWD/../../..
-ROOTDIR=$(PROJECTDIR)/rootdir
+ROOT=$(PROJECTDIR)/rootdir
 
 OUT = z80.out
 
@@ -8,7 +8,7 @@
 all: tests
 
 tests: $(OUT)
-	@PATH=$(ROOTDIR)/bin:$$PATH ./chktest.sh
+	@PATH=$(ROOT)/bin:$$PATH ./chktest.sh
 
 z80.out: master.s
 	z80-unknown-coff-as -o $@ master.s
--- a/tests/scc/Makefile
+++ /dev/null
@@ -1,7 +1,0 @@
-.POSIX:
-include ../../config.mk
-
-DIRS=error execute
-
-all clean:
-	$(FORALL)
--- a/tests/scc/execute/Makefile
+++ b/tests/scc/execute/Makefile
@@ -1,9 +1,11 @@
 .POSIX:
 
+ROOT=../../../rootdir
+
 all: tests
 
 tests:
-	CFLAGS='' SCCPREFIX=../../rootdir/ PATH=../../rootdir/bin:$$PATH ./chktest.sh scc-tests.lst
+	CFLAGS='' SCCPREFIX=$(ROOT) PATH=$(ROOT)/bin:$$PATH ./chktest.sh scc-tests.lst
 
 clean:
 	rm -f *.as *.o *.ir *.qbe *core test.log