Skip to contentSkip to conversation

build: disarm the TCG unit test trap

PATCH Applied Daniel P. Berrange 5 participants 5 messages Nov 21, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 build: disarm the TCG unit test trap

Developers sometimes mistakenly run 'make test' instead of 'make check'. 'make test' triggers the ancient, unmaintained tcg unit tests in tests/tcg/Makefile which have long since ceased compiling.

Even if someone fixes the TCG tests, it makes little sense to put them in a 'make test' target, rather they should be 'make check-tcg', possibly wired up as a dependency of 'make check'.

In the meantime, this patch disarms the 'make test' trap by simply deleting it so users get an immediate error. This should be enough for them to remember to type 'make check' instead (or 'make help' to learn). It also deletes 'make speed' which is another route into the tcg tests.

---

Changed in v2:

- Remove 'test' & 'speed' targets, instead of making 'test' a synonym for 'check'

 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile +1 -5
index d2e31d98af..ab0354c153 100644
@@ -253,7 +253,7 @@ Makefile: ;
 configure: ;
 
 .PHONY: all clean cscope distclean html info install install-doc \
-	pdf txt recurse-all speed test dist msi FORCE
+	pdf txt recurse-all dist msi FORCE
 
 $(call set-vpath, $(SRC_PATH))
 
@@ -716,10 +716,6 @@ endif
 	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
         done
 
-# various test targets
-test speed: all
-	$(MAKE) -C tests/tcg $@
-
 .PHONY: ctags
 ctags:
 	rm -f tags
Signature · 1 line
2.14.3
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Daniel P. Berrange

Developers sometimes mistakenly run 'make test' instead of 'make check'. 'make test' triggers the ancient, unmaintained tcg unit tests in tests/tcg/Makefile which have long since ceased compiling.

Even if someone fixes the TCG tests, it makes little sense to put them in a 'make test' target, rather they should be 'make check-tcg', possibly wired up as a dependency of 'make check'.

Quoted 5 lines

In the meantime, this patch disarms the 'make test' trap by simply deleting it so users get an immediate error. This should be enough for them to remember to type 'make check' instead (or 'make help' to learn). It also deletes 'make speed' which is another route into the tcg tests.

Thanks; I mistakenly fell for this trap.

Quoted 10 lines

---

Changed in v2:

- Remove 'test' & 'speed' targets, instead of making 'test' a synonym for 'check'

 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

[...]

Signature · 1 line
/kashyap
Reviewed-by on v2 1/1
#2 lore raw
In reply to Daniel P. Berrange
Quoted 49 lines · Daniel P. Berrange

Developers sometimes mistakenly run 'make test' instead of 'make check'. 'make test' triggers the ancient, unmaintained tcg unit tests in tests/tcg/Makefile which have long since ceased compiling.

Even if someone fixes the TCG tests, it makes little sense to put them in a 'make test' target, rather they should be 'make check-tcg', possibly wired up as a dependency of 'make check'.

In the meantime, this patch disarms the 'make test' trap by simply deleting it so users get an immediate error. This should be enough for them to remember to type 'make check' instead (or 'make help' to learn). It also deletes 'make speed' which is another route into the tcg tests.

---

Changed in v2:

- Remove 'test' & 'speed' targets, instead of making 'test' a synonym for 'check'

  Makefile | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
Makefile +1 -5
index d2e31d98af..ab0354c153 100644
@@ -253,7 +253,7 @@ Makefile: ;
  configure: ;
 
  .PHONY: all clean cscope distclean html info install install-doc \
-	pdf txt recurse-all speed test dist msi FORCE
+	pdf txt recurse-all dist msi FORCE
 
  $(call set-vpath, $(SRC_PATH))
 
@@ -716,10 +716,6 @@ endif
  	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
          done
 
-# various test targets
-test speed: all
-	$(MAKE) -C tests/tcg $@
-
  .PHONY: ctags
  ctags:
  	rm -f tags
Reviewed-by on v2 1/1
#3 lore raw
In reply to Daniel P. Berrange
Quoted 8 lines · Daniel P. Berrange

Developers sometimes mistakenly run 'make test' instead of 'make check'. 'make test' triggers the ancient, unmaintained tcg unit tests in tests/tcg/Makefile which have long since ceased compiling.

Even if someone fixes the TCG tests, it makes little sense to put them in a 'make test' target, rather they should be 'make check-tcg', possibly wired up as a dependency of 'make check'.

Quoted 7 lines

In the meantime, this patch disarms the 'make test' trap by simply deleting it so users get an immediate error. This should be enough for them to remember to type 'make check' instead (or 'make help' to learn). It also deletes 'make speed' which is another route into the tcg tests.

Quoted 35 lines

---

Changed in v2:

- Remove 'test' & 'speed' targets, instead of making 'test' a synonym for 'check'

 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Makefile +1 -5
index d2e31d98af..ab0354c153 100644
@@ -253,7 +253,7 @@ Makefile: ;
 configure: ;
 
 .PHONY: all clean cscope distclean html info install install-doc \
-	pdf txt recurse-all speed test dist msi FORCE
+	pdf txt recurse-all dist msi FORCE
 
 $(call set-vpath, $(SRC_PATH))
 
@@ -716,10 +716,6 @@ endif
 	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
         done
 
-# various test targets
-test speed: all
-	$(MAKE) -C tests/tcg $@
-
 .PHONY: ctags
 ctags:
 	rm -f tags
#4 lore raw
In reply to Daniel P. Berrange
Quoted 8 lines · Daniel P. Berrange

Developers sometimes mistakenly run 'make test' instead of 'make check'. 'make test' triggers the ancient, unmaintained tcg unit tests in tests/tcg/Makefile which have long since ceased compiling.

Even if someone fixes the TCG tests, it makes little sense to put them in a 'make test' target, rather they should be 'make check-tcg', possibly wired up as a dependency of 'make check'.

Quoted 9 lines

In the meantime, this patch disarms the 'make test' trap by simply deleting it so users get an immediate error. This should be enough for them to remember to type 'make check' instead (or 'make help' to learn). It also deletes 'make speed' which is another route into the tcg tests.

---

Applied to master, thanks (will be nice to stop having to tell people about this one :-))

-- PMM