< prev index next >
test/make/UtilsForTests.gmk
Print this page
rev 52919 : 8189861: Refactor CacheFind
Reviewed-by: sgehwolf
@@ -1,7 +1,7 @@
#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
@@ -27,15 +27,20 @@
# Assert two strings are equal
# 1 - Tested value
# 2 - Exepected value
# 3 - Error message
-define assert-equals
- ifneq ($$(strip $1),$$(strip $2))
- $$(error $3 - Expected >$$(strip $2)< - Got >$$(strip $1)<)
- endif
-endef
+AssertEquals = \
+ $(if $(call equals, $(strip $1), $(strip $2)), , \
+ $(info FAILURE: $3) \
+ $(info Expected: >$(strip $2)<) \
+ $(info Actual: >$(strip $1)<) \
+ $(error $3) \
+ )
+
+CreateFile = $(shell $(MKDIR) -p $(call ShellQuote, $(dir $1)) \
+ && $(TOUCH) $(call ShellQuote, $1))
# On macosx, file system timestamps only have 1 second resultion so must add
# sleeps to properly test dependencies.
ifeq ($(OPENJDK_BUILD_OS), macosx)
SLEEP_ON_MAC := sleep 1
< prev index next >