| # |
| # Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. |
| # |
| # This program and the accompanying materials are made available under the |
| # terms of the Eclipse Public License v. 2.0, which is available at |
| # http://www.eclipse.org/legal/epl-2.0. |
| # |
| # This Source Code may also be made available under the following Secondary |
| # Licenses when the conditions for such availability set forth in the |
| # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| # version 2 with the GNU Classpath Exception, which is available at |
| # https://www.gnu.org/software/classpath/license.html. |
| # |
| # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| # |
| |
| # User customizable variable definitions only |
| |
| # The BUILD_ROOT variable must be defined |
| BUILD_ROOT=. |
| # include bootstrap variable definitions |
| include $(BUILD_ROOT)/../bootstrap/defines.mk |
| # include bootstrap rule definitions |
| include $(BUILD_ROOT)/../bootstrap/rules.mk |
| |
| # see runall target |
| include config.properties |
| ANT_DIR= $(BUILD_ROOT)/../publish/$(JAVA_OBJDIR)/ant |
| APS_DIR= $(shell pwd) |
| JDK_DIR= $(ANT_JAVA_HOME) |
| |
| # User customizable rules |
| |
| DB_PORT_1=9092 |
| DB_PORT_2=9093 |
| |
| ifeq ($(OS_ARCH),WINNT) |
| CLASSPATH=$(S1AS_HOME)/lib/mail.jar;$(S1AS_HOME)/lib/activation.jar;$(S1AS_HOME)/lib/commons-logging.jar |
| else |
| CLASSPATH=$(S1AS_HOME)/lib/mail.jar:$(S1AS_HOME)/lib/activation.jar:$(S1AS_HOME)/lib/commons-logging.jar |
| endif |
| |
| runtest:: cleanup |
| $(BS_MAKE) start |
| $(BS_MAKE) CLASSPATH="$(CLASSPATH)" $(ANT_ENV) ANT_TARGETS=runtest antit |
| $(BS_MAKE) stop |
| |
| startPB:: |
| $(BS_MAKE) $(ANT_ENV) ANT_TARGETS=preparePB antit |
| ifeq ($(OS_ARCH),WINNT) |
| JAVA_HOME=$(JDK_DIR) sh startpb.win.sh $(DB_PORT_1) & |
| JAVA_HOME=$(JDK_DIR) sh startpb.win.sh $(DB_PORT_2) & |
| else |
| JAVA_HOME=$(JDK_DIR) sh startpb.sh $(DB_PORT_1) & |
| JAVA_HOME=$(JDK_DIR) sh startpb.sh $(DB_PORT_2) & |
| endif |
| |
| stopPB:: |
| ifeq ($(OS_ARCH),WINNT) |
| stoppb.bat $(ANT_JAVA_HOME) $(DB_PORT_1) |
| stoppb.bat $(ANT_JAVA_HOME) $(DB_PORT_2) |
| else |
| JAVA_HOME=$(JDK_DIR) sh stoppb.sh $(DB_PORT_1) |
| JAVA_HOME=$(JDK_DIR) sh stoppb.sh $(DB_PORT_2) |
| endif |
| |
| mail:: |
| $(BS_MAKE) CLASSPATH=$(CLASSPATH) $(ANT_ENV) ANT_TARGETS=mail antit |
| |
| prepare:: |
| $(BS_MAKE) CLASSPATH=$(CLASSPATH) $(ANT_ENV) ANT_TARGETS=preparePB antit |
| |
| start:: startPB |
| JAVA_HOME=$(JDK_DIR) sh start-domain.sh |
| |
| stop:: |
| JAVA_HOME=$(JDK_DIR) sh stop-domain.sh |
| $(BS_MAKE) stopPB |
| |
| run:: cleanup |
| $(BS_MAKE) CLASSPATH="$(CLASSPATH)" $(ANT_ENV) ANT_TARGETS=runtest antit |
| |
| cleanup:: |
| rm -f $(APS_HOME)/count.txt |
| rm -f $(APS_HOME)/*.output |
| rm -f $(APS_HOME)/test_results* |
| |
| |
| # If you set s1as.home in config.properties you can then run 'gmake runall' |
| # from this directory without having to set any environment variables. |
| # (note: s1as.home should use / in the path even on windows) |
| runall: |
| @echo using s1as instance at $(s1as.home) |
| ANT_HOME=$(ANT_DIR) APS_HOME=$(APS_DIR) S1AS_HOME=$(s1as.home) \ |
| JAVA_HOME=$(JDK_DIR) $(BS_MAKE) runtest |