author | erikj |
Tue, 24 Oct 2017 10:41:45 +0200 | |
changeset 54380 | e297c7bb6469 |
parent 53683 | 48ff68e2fe5c |
permissions | -rw-r--r-- |
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
1 |
# |
54380 | 2 |
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
4 |
# |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
10 |
# |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
16 |
# |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
20 |
# |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
23 |
# questions. |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
24 |
# |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
25 |
|
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
26 |
# This file contains utilities common for multiple test makefiles. |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
27 |
|
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
28 |
# Assert two strings are equal |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
29 |
# 1 - Tested value |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
30 |
# 2 - Exepected value |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
31 |
# 3 - Error message |
54380 | 32 |
AssertEquals = \ |
33 |
$(if $(call equals, $(strip $1), $(strip $2)), , \ |
|
34 |
$(info FAILURE: $3) \ |
|
35 |
$(info Expected: >$(strip $2)<) \ |
|
36 |
$(info Actual: >$(strip $1)<) \ |
|
37 |
$(error $3) \ |
|
38 |
) |
|
39 |
||
40 |
CreateFile = $(shell $(MKDIR) -p $(call ShellQuote, $(dir $1)) \ |
|
41 |
&& $(TOUCH) $(call ShellQuote, $1)) |
|
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
42 |
|
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
43 |
# On macosx, file system timestamps only have 1 second resultion so must add |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
44 |
# sleeps to properly test dependencies. |
53683 | 45 |
ifeq ($(call isBuildOs, macosx), true) |
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
46 |
SLEEP_ON_MAC := sleep 1 |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
diff
changeset
|
47 |
endif |