aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-26 13:50:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-26 13:50:29 +0200
commit30895144f680a8b9a8b4b6313edb726361d36000 (patch)
tree315b76520ecad8c6a0833298673b0c0dbc8b6036 /common
parent6ac4f59699084b7c3967286b7b1f26df9f9c053d (diff)
Save test result to a temp file instead of piping it to diff
This makes tests more robust.
Diffstat (limited to 'common')
-rw-r--r--common/auto/makefile5
-rw-r--r--common/composite/makefile5
-rw-r--r--common/const/makefile5
-rw-r--r--common/container/makefile5
-rw-r--r--common/ctor/makefile5
-rw-r--r--common/inverse/makefile5
-rw-r--r--common/lifecycle/makefile5
-rw-r--r--common/query/makefile5
-rw-r--r--common/relationship/makefile5
-rw-r--r--common/schema/makefile5
-rw-r--r--common/template/makefile5
-rw-r--r--common/threads/makefile5
12 files changed, 48 insertions, 12 deletions
diff --git a/common/auto/makefile b/common/auto/makefile
index e4cdffd..30d480a 100644
--- a/common/auto/makefile
+++ b/common/auto/makefile
@@ -67,7 +67,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -76,6 +78,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/composite/makefile b/common/composite/makefile
index 577cad6..81f32f0 100644
--- a/common/composite/makefile
+++ b/common/composite/makefile
@@ -68,7 +68,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -77,6 +79,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/const/makefile b/common/const/makefile
index e8759bc..d465721 100644
--- a/common/const/makefile
+++ b/common/const/makefile
@@ -68,7 +68,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -77,6 +79,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/container/makefile b/common/container/makefile
index 450da44..9fe50af 100644
--- a/common/container/makefile
+++ b/common/container/makefile
@@ -67,7 +67,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -76,6 +78,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/ctor/makefile b/common/ctor/makefile
index 4dcd10c..489ecdd 100644
--- a/common/ctor/makefile
+++ b/common/ctor/makefile
@@ -68,7 +68,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -77,6 +79,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/inverse/makefile b/common/inverse/makefile
index e64cced..b7480fc 100644
--- a/common/inverse/makefile
+++ b/common/inverse/makefile
@@ -69,7 +69,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -78,6 +80,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/lifecycle/makefile b/common/lifecycle/makefile
index b2a6875..e2f1f66 100644
--- a/common/lifecycle/makefile
+++ b/common/lifecycle/makefile
@@ -67,7 +67,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -76,6 +78,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/query/makefile b/common/query/makefile
index 08eb33d..0775df6 100644
--- a/common/query/makefile
+++ b/common/query/makefile
@@ -69,7 +69,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -78,6 +80,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/relationship/makefile b/common/relationship/makefile
index a3857d4..7ed60cf 100644
--- a/common/relationship/makefile
+++ b/common/relationship/makefile
@@ -69,7 +69,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -78,6 +80,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/schema/makefile b/common/schema/makefile
index 5c71905..0cd51d6 100644
--- a/common/schema/makefile
+++ b/common/schema/makefile
@@ -67,7 +67,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -76,6 +78,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/template/makefile b/common/template/makefile
index cff4185..02605ef 100644
--- a/common/template/makefile
+++ b/common/template/makefile
@@ -67,7 +67,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -76,6 +78,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#
diff --git a/common/threads/makefile b/common/threads/makefile
index 73174d9..71c522b 100644
--- a/common/threads/makefile
+++ b/common/threads/makefile
@@ -68,7 +68,9 @@ $(dist):
$(test): $(driver) $(src_base)/test.std
$(call message,sql $$1,$(dcf_root)/db-driver $$1, $(src_base)/test.sql)
$(call message,test $<,$< --options-file $(dcf_root)/db.options \
-| diff -u $(src_base)/test.std -)
+>$(out_base)/test.out)
+ $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out)
+ $(call message,,rm -f $(out_base)/test.out)
# Clean.
#
@@ -77,6 +79,7 @@ $(clean): \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od)) \
$(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean))
+ $(call message,,rm -f $(out_base)/test.out)
# Generated .gitignore.
#