зеркало из https://github.com/mozilla/pjs.git
Patch contributed by Michal Ceresna and verified by John Marmion.
This patch makes the webclient trunk work with the MOZILLA_0_9_9_BRANCH on linux.
This commit is contained in:
Родитель
a360047501
Коммит
c0f9b85e15
|
@ -1,71 +0,0 @@
|
|||
#!gmake
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifneq ($(BUILD_DOM_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom
|
||||
else
|
||||
ifneq ($(BUILD_PLUGLETS_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
plugins
|
||||
else
|
||||
ifneq ($(BUILD_WEBCLIENT_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
xpcom \
|
||||
webclient
|
||||
else
|
||||
ifneq ($(BUILD_BLACKCONNECT_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
xpcom
|
||||
else
|
||||
ifneq ($(BUILD_BLACKWOOD),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
xpcom \
|
||||
webclient \
|
||||
plugins
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(PACKAGE_BUILD),)
|
||||
DIRS += build
|
||||
endif
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
@ -29,7 +29,7 @@ PACKAGE_LIB=$(PACKAGE_DIR)/lib
|
|||
PACKAGE_EXAMPLE=$(PACKAGE_DIR)/example
|
||||
|
||||
ifeq ($(PACKAGE_VER),)
|
||||
PACKAGE_VER=1_1
|
||||
PACKAGE_VER=1.2
|
||||
endif
|
||||
|
||||
|
||||
|
@ -106,7 +106,6 @@ ifneq ($(BUILD_WEBCLIENT_ONLY),)
|
|||
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/dom $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/webclient $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/xpcom $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
|
||||
cd $(DIST)/../java/build
|
||||
$(JDKHOME)/bin/jar -cvfM0 webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
|
||||
|
@ -117,17 +116,6 @@ ifneq ($(BUILD_WEBCLIENT_ONLY),)
|
|||
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
|
||||
cp $(DIST)/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so
|
||||
cp $(DIST)/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so
|
||||
cp $(DIST)/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so
|
||||
cp $(DIST)/bin/libblackconnectjni.so $(PACKAGE_LIB)/libblackconnectjni.so
|
||||
cp $(DIST)/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
cp $(DIST)/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so
|
||||
cp $(DIST)/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
cp $(DIST)/bin/regxpcom $(PACKAGE_LIB)/regxpcom
|
||||
chmod 775 $(PACKAGE_LIB)/libbcorb.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavaloader.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/regxpcom
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadom.so
|
||||
chmod 775 $(PACKAGE_LIB)/libwebclient.so
|
||||
|
@ -138,7 +126,6 @@ ifneq ($(BUILD_WEBCLIENT_ONLY),)
|
|||
@echo cp ../lib/libwebclientstub.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libjavadom.so ../../components >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libjavadomjni.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libblackconnectjni.so ../.. >> runem_unix_commercial.bat
|
||||
@echo $(SET_CLASSPATH)../lib/webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar>> runem_unix_commercial.bat
|
||||
@echo $(PERL) ./runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl $(DEPTH) %1% >> runem_unix_commercial.bat
|
||||
cp -f runem_unix_commercial.bat $(PACKAGE_EXAMPLE)/runem.bat
|
||||
|
@ -150,7 +137,7 @@ ifneq ($(BUILD_WEBCLIENT_ONLY),)
|
|||
chmod 775 $(DIST)/symlink.sh
|
||||
cp $(DIST)/../java/build/README.WEBCLIENT $(PACKAGE_DIR)/README.WEBCLIENT
|
||||
cd $(DIST) ; \
|
||||
zip -r webclient_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
|
||||
$(JDKHOME)/bin/jar -cvfM0 webclient_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
|
||||
else
|
||||
ifneq ($(BUILD_BLACKCONNECT_ONLY),)
|
||||
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
|
||||
|
|
|
@ -1,236 +0,0 @@
|
|||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ..\..
|
||||
IGNORE_MANIFEST = 1
|
||||
|
||||
JAVAHOME = $(JDKHOME)
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
PACKAGE_DIR = $(DEPTH)\dist\javadev
|
||||
PACKAGE_LIB = $(PACKAGE_DIR)\lib
|
||||
PACKAGE_EXAMPLE = $(PACKAGE_DIR)\example
|
||||
|
||||
!ifndef PACKAGE_VER
|
||||
PACKAGE_VER = 1.2
|
||||
!endif
|
||||
|
||||
|
||||
buildRunems:
|
||||
!ifdef BUILD_DOM_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\dom $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\util $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\w3c $(DIST)\..\java\build\org
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 JavaDOM_$(PACKAGE_VER)_win32.jar org
|
||||
copy JavaDOM_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\JavaDOM_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\JavaDOM_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
copy install_dom_win32.js $(DIST)\..\install.js
|
||||
copy README.DOM $(PACKAGE_DIR)\README.DOM
|
||||
cd $(DIST)\..
|
||||
zip -r JavaDOM_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_PLUGLETS_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\util $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\dom $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\plugins $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\w3c $(DIST)\..\java\build\org
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 Pluglet_$(PACKAGE_VER)_win32.jar org
|
||||
copy Pluglet_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\Pluglet_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\Pluglet_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
copy $(DIST)\bin\plugletjni.dll $(PACKAGE_LIB)\plugletjni.dll
|
||||
copy $(DIST)\bin\components\pluglet.dll $(PACKAGE_LIB)\pluglet.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\plugletjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\pluglet.dll
|
||||
copy install_pluglet_win32.js $(DIST)\..\install.js
|
||||
copy README.PLUGLET $(PACKAGE_DIR)\README.PLUGLET
|
||||
cd $(DIST)\..
|
||||
zip -r Pluglet_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_WEBCLIENT_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\w3c
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla\util
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla\dom
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla\webclient
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\util $(DIST)\..\java\build\org\mozilla\util
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\dom $(DIST)\..\java\build\org\mozilla\dom
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\webclient $(DIST)\..\java\build\org\mozilla\webclient
|
||||
xcopy /E /Y $(DIST)\..\classes\org\w3c $(DIST)\..\java\build\org\w3c
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 webclient_$(PACKAGE_VER)_win32.jar org
|
||||
copy webclient_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\webclient_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\webclient_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\components\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
copy $(DIST)\bin\webclient.dll $(PACKAGE_LIB)\webclient.dll
|
||||
copy $(DIST)\lib\wc_share.lib $(PACKAGE_LIB)\wc_share.lib
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\webclient.dll
|
||||
chmod 775 $(PACKAGE_LIB)\wc_share.lib
|
||||
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
|
||||
rm -f runem_win_commercial.bat
|
||||
@echo set CLASSPATH=..\lib\webclient_$(PACKAGE_VER)_win32.jar> runem_win_commercial.bat
|
||||
@echo $(PERL) .\runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl $(DEPTH) %1% >> runem_win_commercial.bat
|
||||
copy runem_win_commercial.bat $(PACKAGE_EXAMPLE)\runem.bat
|
||||
copy $(DIST)\..\..\java\webclient\src_share\runem.pl $(PACKAGE_EXAMPLE)\runem.pl
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.bat
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.pl
|
||||
copy install_webclient_win32.js $(DIST)\..\install.js
|
||||
copy README.WEBCLIENT $(PACKAGE_DIR)\README.WEBCLIENT
|
||||
cd $(DIST)\..
|
||||
jar -cvM0f webclient_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
rm -rf install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_BLACKCONNECT_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\util $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\xpcom $(DIST)\..\java\build\org\mozilla
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 Blackconnect_$(PACKAGE_VER)_win32.jar org
|
||||
copy Blackconnect_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\Blackconnect_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\Blackconnect_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\components\bcorb.dll $(PACKAGE_LIB)\bcorb.dll
|
||||
copy $(DIST)\bin\components\bcjavastubs.dll $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
copy $(DIST)\bin\components\bcjavaloader.dll $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
copy $(DIST)\bin\components\bcxpcomstubs.dll $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
copy $(DIST)\bin\regxpcom.exe $(PACKAGE_LIB)\regxpcom.exe
|
||||
chmod 775 $(PACKAGE_LIB)\bcorb.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\regxpcom.exe
|
||||
copy install_blackconnect_win32.js $(DIST)\..\install.js
|
||||
copy README.BLACKCONNECT $(PACKAGE_DIR)\README.BLACKCONNECT
|
||||
cd $(DIST)\..
|
||||
zip -r Blackconnect_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_BLACKWOOD
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /Y $(DIST)\..\classes\org\mozilla\* $(DIST)\..\java\build\org
|
||||
xcopy /E /Y $(DIST)\..\classes\org\w3c $(DIST)\..\java\build\org
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 Blackwood_$(PACKAGE_VER)_win32.jar org
|
||||
copy Blackwood_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\Blackwood_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\Blackwood_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
copy $(DIST)\bin\plugletjni.dll $(PACKAGE_LIB)\plugletjni.dll
|
||||
copy $(DIST)\bin\components\pluglet.dll $(PACKAGE_LIB)\pluglet.dll
|
||||
copy $(DIST)\bin\webclient.dll $(PACKAGE_LIB)\webclient.dll
|
||||
copy $(DIST)\lib\wc_share.lib $(PACKAGE_LIB)\wc_share.lib
|
||||
copy $(DIST)\bin\components\bcorb.dll $(PACKAGE_LIB)\bcorb.dll
|
||||
copy $(DIST)\bin\components\bcjavastubs.dll $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
copy $(DIST)\bin\components\bcjavaloader.dll $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
copy $(DIST)\bin\components\bcxpcomstubs.dll $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
copy $(DIST)\bin\regxpcom.exe $(PACKAGE_LIB)\regxpcom.exe
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\plugletjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\pluglet.dll
|
||||
chmod 775 $(PACKAGE_LIB)\webclient.dll
|
||||
chmod 775 $(PACKAGE_LIB)\wc_share.lib
|
||||
chmod 775 $(PACKAGE_LIB)\bcorb.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\regxpcom.exe
|
||||
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
|
||||
rm -f runem_win_commercial.bat
|
||||
@echo set CLASSPATH=..\lib\Blackwood_$(PACKAGE_VER)_win32.jar > runem_win_commercial.bat
|
||||
@echo $(PERL) .\runem.pl org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem_win_commercial.bat
|
||||
copy runem_win_commercial.bat $(PACKAGE_EXAMPLE)\runem.bat
|
||||
copy $(DIST)\..\..\java\webclient\src_share\runem.pl $(PACKAGE_EXAMPLE)\runem.pl
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.bat
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.pl
|
||||
copy install_blackwood_win32.js $(DIST)\..\install.js
|
||||
copy README.BLACKWOOD $(PACKAGE_DIR)\README.BLACKWOOD
|
||||
cd $(DIST)\..
|
||||
zip -r Blackwood_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!endif #BLACKWOOD
|
||||
!endif #BLACKCONNECT
|
||||
!endif #WEBCLIENT
|
||||
!endif #PLUGLETS
|
||||
!endif #DOM
|
||||
|
||||
|
||||
install::buildRunems
|
||||
|
||||
#export::buildRunems
|
||||
|
||||
|
||||
clobber::
|
||||
rm -rf $(DIST)\..\*.xpi
|
||||
rm -rf $(DIST)\..\javadev
|
||||
rm -rf $(DIST)\..\java
|
||||
|
||||
|
||||
clobber_all::clobber
|
||||
|
||||
|
||||
clean::clobber
|
|
@ -1,52 +0,0 @@
|
|||
#!gmake
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
JDIRS = org/mozilla/dom \
|
||||
org/mozilla/dom/events \
|
||||
org/mozilla/dom/util \
|
||||
$(NULL)
|
||||
|
||||
|
||||
rm_java:
|
||||
ifeq ($(PACKAGE_BUILD),)
|
||||
rm -Rf $(topsrcdir)/dist/classes/org/mozilla/dom
|
||||
endif # PACKAGE_BUILD
|
||||
|
||||
|
||||
clobber_all::rm_java
|
||||
|
||||
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC_PROG = $(JDKHOME)/bin/javac
|
||||
JAVAC_FLAGS = -classpath $(CLASSPATH) -d $(JAVA_DESTPATH)
|
||||
JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS)
|
||||
|
|
@ -24,6 +24,25 @@ VPATH = $(topsrcdir)/java/dom/jni
|
|||
|
||||
JAVAHOME = $(JDKHOME)
|
||||
|
||||
REQUIRES = xpcom \
|
||||
javadom \
|
||||
string \
|
||||
embed_base \
|
||||
webBrowser_core \
|
||||
webshell \
|
||||
windowwatcher \
|
||||
profile \
|
||||
necko \
|
||||
docshell \
|
||||
dom \
|
||||
widget \
|
||||
uriloader \
|
||||
shistory \
|
||||
webbrowserpersist \
|
||||
content \
|
||||
gfx \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
LIBRARY_NAME = javadomjni
|
||||
|
@ -74,6 +93,8 @@ JAVA_CLS= \
|
|||
org.mozilla.dom.events.UIEventImpl \
|
||||
$(NULL)
|
||||
|
||||
INCLUDES += -I$(JAVAHOME)/include -I$(JAVAHOME)/include/linux
|
||||
|
||||
JAVAH_PROG=$(JDKHOME)/bin/javah
|
||||
JAVAH_FLAGS=-jni -classpath $(CLASSPATH):$(JAVA_DESTPATH)
|
||||
|
||||
|
|
|
@ -28,6 +28,25 @@ MODULE = javadom
|
|||
LIBRARY_NAME = javadom
|
||||
IS_COMPONENT = 1
|
||||
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
embed_base \
|
||||
webBrowser_core \
|
||||
webshell \
|
||||
windowwatcher \
|
||||
profile \
|
||||
necko \
|
||||
docshell \
|
||||
dom \
|
||||
widget \
|
||||
uriloader \
|
||||
shistory \
|
||||
webbrowserpersist \
|
||||
content \
|
||||
gfx \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
nsJavaDOMImpl.cpp
|
||||
|
||||
|
|
|
@ -546,11 +546,7 @@ JNIEnv* nsJavaDOMImpl::GetJNIEnv() {
|
|||
if (!jvm) {
|
||||
StartJVM();
|
||||
}
|
||||
#ifdef XP_PC
|
||||
jvm->AttachCurrentThread((void**)&env,NULL);
|
||||
#else
|
||||
jvm->AttachCurrentThread(&env,NULL);
|
||||
#endif
|
||||
#endif /* JAVA_DOM_OJI_ENABLE */
|
||||
return env;
|
||||
}
|
||||
|
@ -596,11 +592,7 @@ void nsJavaDOMImpl::StartJVM(void) {
|
|||
#ifdef DEBUG
|
||||
printf("classpath is \"%s\"\n", vm_args.classpath);
|
||||
#endif // DEBUG
|
||||
#ifdef XP_PC
|
||||
jint rv = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
|
||||
#else
|
||||
jint rv = JNI_CreateJavaVM(&jvm, &env, &vm_args);
|
||||
#endif
|
||||
if (rv < 0) {
|
||||
printf("\n JAVA DOM: could not start jvm\n");
|
||||
} else {
|
||||
|
|
|
@ -25,7 +25,8 @@ include $(DEPTH)/config/autoconf.mk
|
|||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DIRS= import classes_spec src_share src_moz
|
||||
DIRS= classes_spec src_share src_moz
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
|
|
|
@ -61,6 +61,34 @@ else
|
|||
LIBRARY_NAME = webclient
|
||||
endif
|
||||
|
||||
REQUIRES = xpcom \
|
||||
layout \
|
||||
shistory \
|
||||
appcomps \
|
||||
appshell \
|
||||
pref \
|
||||
locale \
|
||||
intl \
|
||||
rdf \
|
||||
bookmarks \
|
||||
content \
|
||||
editor \
|
||||
string \
|
||||
embed_base \
|
||||
webBrowser_core \
|
||||
webbrwsr \
|
||||
webshell \
|
||||
windowwatcher \
|
||||
profile \
|
||||
necko \
|
||||
docshell \
|
||||
dom \
|
||||
widget \
|
||||
uriloader \
|
||||
webbrowserpersist \
|
||||
gfx \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
ns_util.cpp \
|
||||
ns_util_export.cpp \
|
||||
|
|
|
@ -158,7 +158,9 @@ include <$(DEPTH)\config\rules.mak>
|
|||
buildRunems:
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).dll $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
|
||||
!ifdef MOZ_DEBUG
|
||||
copy $(DIST)\bin\windbgdlg.exe $(JDKHOME)\bin
|
||||
!endif
|
||||
!ifdef BAL_INTERFACE
|
||||
!else
|
||||
!ifndef PACKAGE_BUILD
|
||||
|
|
|
@ -1,636 +0,0 @@
|
|||
#!<PERL_DIR>/perl
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
###################################################################
|
||||
# This script is used to invoke automated test cases for Webclient API
|
||||
# and to record their results
|
||||
#
|
||||
|
||||
# Attach Perl Libraries
|
||||
###################################################################
|
||||
use Cwd;
|
||||
use Cwd 'abs_path';
|
||||
use File::Copy;
|
||||
#For waitpid
|
||||
use POSIX ":sys_wait_h";
|
||||
|
||||
###################################################################
|
||||
#Initialization procedure
|
||||
#
|
||||
# STILL_ALIVE is a constant defined in winbase.h and indicates what
|
||||
# process still alive
|
||||
###################################################################
|
||||
sub init() {
|
||||
#assume, that script is placed to build/run directory
|
||||
$depth="../..";
|
||||
$topdir = abs_path($depth);
|
||||
$curdir = cwd();
|
||||
$start_date = localtime();
|
||||
$date=$start_date;
|
||||
$date =~ s/[ :]/_/g;
|
||||
|
||||
$logdir = "$topdir/log/$date";
|
||||
mkdir($logdir, 0777);
|
||||
|
||||
$COMMON_LOG_FILE = "$logdir/BWTestRun.log";
|
||||
$COMMON_RESULT_FILE = "$logdir/BWTest.txt";
|
||||
$COMMON_RESULT_HTML_FILE = "$logdir/BWTest.html";
|
||||
|
||||
$TEST_LOG_FILE = "$curdir/WebclientTest.log";
|
||||
$TEST_RESULT_FILE = "$curdir/WebclientTest.res";
|
||||
$TEST_INIT_FILE = "$curdir/StartProperties";
|
||||
|
||||
$COMMON_PARAMS_FILE = "$topdir/config/CommonProperties";
|
||||
|
||||
$test_params_file_name = "TestProperties";
|
||||
$runner_class = "org.mozilla.webclient.test.basic.TestRunner";
|
||||
%params=();
|
||||
$delimiter="###################################################\n";
|
||||
if ($^O=~/Win32/) {
|
||||
$STILL_ALIVE = 0x103;
|
||||
$path_separator = ";";
|
||||
$file_separator = "\\";
|
||||
$JAVA="java.exe";
|
||||
} else { #Unix systems
|
||||
$path_separator = ":";
|
||||
$file_separator = "\/";
|
||||
$JAVA="java";
|
||||
}
|
||||
$javahome=$ENV{"JAVAHOME"};
|
||||
unless(-f "$javahome$file_separator$JAVA") {
|
||||
die "Can't find java executable $javahome$file_separator$JAVA";
|
||||
}
|
||||
}
|
||||
##################################################################
|
||||
# Usage
|
||||
##################################################################
|
||||
sub usage() {
|
||||
|
||||
print "\n";
|
||||
print "##################################################################\n";
|
||||
print " perl autorun.pl [ -m ] [ -f <test cases list file> ]\n";
|
||||
print "\n";
|
||||
print " where <test cases list file> is file with test cases list.\n";
|
||||
print "\n";
|
||||
print "or:\n";
|
||||
print " perl autorun.pl [ -m ] [ -t <test case> ]\n";
|
||||
print "\n";
|
||||
print " where <test case> is one of the test cases IDs\n";
|
||||
print " for ex: basic/api/History_getURLForIndex:2\n";
|
||||
print "\n";
|
||||
print "The [ -m ] switch is used to run \"mixed\" tests.\n";
|
||||
print "\n";
|
||||
print "##################################################################\n";
|
||||
print "\n";
|
||||
|
||||
}
|
||||
|
||||
##################################################################
|
||||
# Title display
|
||||
##################################################################
|
||||
sub title() {
|
||||
|
||||
print "\n";
|
||||
print "##################################################################\n";
|
||||
print " Automated Execution of Java Webclient TestSuite\n";
|
||||
print "##################################################################\n";
|
||||
print "\n";
|
||||
print "\n";
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct LogFile Header. The Log file is always appended with entries
|
||||
#
|
||||
#########################################################################
|
||||
sub constructLogHeader() {
|
||||
print COMMON_LOG_FILE "\n";
|
||||
print COMMON_LOG_FILE "\n";
|
||||
print COMMON_LOG_FILE $delimiter;
|
||||
print COMMON_LOG_FILE "Logging Test Run on $start_date ...\n";
|
||||
print COMMON_LOG_FILE $delimiter;
|
||||
print COMMON_LOG_FILE "\n";
|
||||
|
||||
print "All Log Entries are maintained in LogFile $COMMON_LOG_FILE\n";
|
||||
print "\n";
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct LogFile Footer.
|
||||
#
|
||||
#########################################################################
|
||||
sub constructLogFooter() {
|
||||
print "\n";
|
||||
print COMMON_LOG_FILE $delimiter;
|
||||
$date = localtime;
|
||||
print COMMON_LOG_FILE "End of Logging Test $date ...\n";
|
||||
print COMMON_LOG_FILE $delimiter;
|
||||
print "\n";
|
||||
}
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Construct Log String
|
||||
#
|
||||
########################################################################
|
||||
sub constructLogString {
|
||||
my $logstring = shift(@_);
|
||||
print COMMON_LOG_FILE "$logstring\n";
|
||||
|
||||
}
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# Construct Output HTML file indicating status of each run
|
||||
#
|
||||
#########################################################################
|
||||
|
||||
sub constructHTML() {
|
||||
unless(open(LOGHTML,">$COMMON_RESULT_HTML_FILE")) {
|
||||
print("WARNING: Can't open output HTML file\n");
|
||||
return;
|
||||
}
|
||||
print LOGHTML "<html><head><title>\n";
|
||||
print LOGHTML "Webclient API Test Status\n";
|
||||
print LOGHTML "</title></head><body bgcolor=\"white\">\n";
|
||||
print LOGHTML "<center><h1>\n";
|
||||
print LOGHTML "Webclient API Automated TestRun Results</h1></center>\n";
|
||||
print LOGHTML "<center><h2>",getParam("BUILD_DESCRIPTION"),"</h2></center>\n";
|
||||
print LOGHTML "<center><h3>Started: ", $start_date,"</h3></center>\n";
|
||||
$date=localtime();
|
||||
print LOGHTML "<center><h3>Ended: ", $date,"</h3></center>\n";
|
||||
print LOGHTML "<hr noshade>";
|
||||
print LOGHTML "<table bgcolor=\"#99FFCC\">\n";
|
||||
print LOGHTML "<tr bgcolor=\"lightblue\">\n";
|
||||
print LOGHTML "<td>Test Case</td>\n";
|
||||
print LOGHTML "<td>Result</td>\n";
|
||||
print LOGHTML "<td>Comment</td>\n";
|
||||
print LOGHTML "</tr>\n";
|
||||
if (open(LOGTXT,$COMMON_RESULT_FILE)) {
|
||||
my @all_lines = <LOGTXT>;
|
||||
close( LOGTXT ) || print "WARNING: Can't close $LOGTXT,HTML_LOG may be incorrect\n";
|
||||
my $line;
|
||||
foreach $line ( @all_lines ) {
|
||||
chop $line;
|
||||
$line=~/^(.*?=)(.*?=)(.*)$/;
|
||||
$class = $1;
|
||||
$status = $2;
|
||||
$comment = $3;
|
||||
$class =~ s/=$//g;
|
||||
$status =~ s/=$//g;
|
||||
$detailed_log="$class.log";
|
||||
$detailed_log=~ s/\/|:/_/g;
|
||||
print LOGHTML "<tr><td><a href=",$detailed_log,">",$class,"</a></td>";
|
||||
if ($status=~/FAILED/) {
|
||||
print LOGHTML "<td><font color=\"red\">",$status,"</font></td>\n";
|
||||
} elsif ($status=~/UNIMPLEMENTED/) {
|
||||
print LOGHTML "<td><font color=\"yellow\">",$status,"</font></td>\n";
|
||||
} else {
|
||||
print LOGHTML "<td>",$status,"</td>\n";
|
||||
}
|
||||
print LOGHTML "<td>",$comment,"</td></tr>\n"
|
||||
}
|
||||
} else {
|
||||
print "WARNING: Can't open $LOGTXT,HTML_LOG may be incorrect\n";
|
||||
}
|
||||
print LOGHTML "</table></body></html>\n";
|
||||
}
|
||||
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Safely append to file : open, append, close.
|
||||
#
|
||||
########################################################################
|
||||
sub safeAppend {
|
||||
my $file = shift(@_);
|
||||
my $line = shift(@_);
|
||||
open (FILE, ">>$file") or die ("Can't open $file");
|
||||
print FILE $line;
|
||||
close FILE;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Loading all parameters for current testcase
|
||||
#
|
||||
########################################################################
|
||||
sub loadAllParams {
|
||||
my $testcase = shift(@_);
|
||||
my %params=();
|
||||
%params = loadParams($COMMON_PARAMS_FILE,\%params);
|
||||
%params = loadParams(getTestDir($testcase).$file_separator.$test_params_file_name,\%params);
|
||||
return %params;
|
||||
}
|
||||
########################################################################
|
||||
#
|
||||
# Loading parameters
|
||||
#
|
||||
########################################################################
|
||||
sub loadParams {
|
||||
my $file = shift(@_);
|
||||
my $params = shift(@_);
|
||||
my $key;
|
||||
my $value;
|
||||
open (PARAMS, "<$file") || die "ERROR: Can't open parameters file $file\n";
|
||||
while ($pair = <PARAMS>) {
|
||||
chomp($pair);
|
||||
$pair=~s#^\s*|\s*$##g;
|
||||
($key,$value) = split('=', $pair);
|
||||
$$params{$key} = $value;
|
||||
}
|
||||
close(PARAMS) || print "WARNING: Can't close parameters file $file\n";
|
||||
return %$params;
|
||||
}
|
||||
########################################################################
|
||||
#
|
||||
# Getting parameter
|
||||
#
|
||||
########################################################################
|
||||
sub getParam {
|
||||
return $params{shift(@_)};
|
||||
}
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Getting test directory from testcase
|
||||
#
|
||||
########################################################################
|
||||
sub getTestDir {
|
||||
my $path = shift(@_);
|
||||
print "$path\n";
|
||||
$path =~ s/:.*$//;
|
||||
print "$path\n";
|
||||
return "$topdir/build/test/$path";
|
||||
}
|
||||
########################################################################
|
||||
#
|
||||
# copy set of test parameters
|
||||
#
|
||||
########################################################################
|
||||
sub getCurrentTestArguments {
|
||||
my $testcase = shift(@_);
|
||||
my $num = $testcase;
|
||||
my $tp="";
|
||||
if (($num =~ /:/) and ($num =~ s/^.*:|\s*$//g)) {
|
||||
my $path = getTestDir($testcase);
|
||||
print "+++++$path+++\n";
|
||||
my $list = "$path/Test.lst";
|
||||
open (LST, $list) || die "ERROR: Can't open file $list\n";
|
||||
while ($tp = <LST>){
|
||||
print "--$tp--$num--\n";
|
||||
unless($tp =~ /^\s*\#/) { #Avoid comments
|
||||
if ($tp =~ /$num:/) {
|
||||
$tp =~ s/$num://;
|
||||
$tp =~ s/^\s*|\s*$//g;
|
||||
print "--Current args are: \"$tp\"\n";
|
||||
close (LST);
|
||||
return $tp;
|
||||
}
|
||||
}
|
||||
}
|
||||
close (LST);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
########################################################################
|
||||
#
|
||||
# Verify results of test execution
|
||||
#
|
||||
########################################################################
|
||||
sub checkResultFile {
|
||||
my $logstring = "";
|
||||
my $resstring = "";
|
||||
my $result = "";
|
||||
if (open(TEST_RESULT, $TEST_RESULT_FILE)) {
|
||||
$result = <TEST_RESULT>;
|
||||
chomp $result;
|
||||
$result=~s#^\s*|\s*$##g;
|
||||
close(TEST_RESULT) || constructLogString "WARNING: Can't close $TEST_RESULT_FILE";
|
||||
if ($result=~/^PASSED/){
|
||||
$resstring="$testcase=$result";
|
||||
$logstring="PASSED due to execution result - $result";
|
||||
} elsif ($result=~/^FAILED/){
|
||||
$resstring="$testcase=$result";
|
||||
$logstring="FAILED due to execution result - $result";
|
||||
} elsif($result=~/^UNIMPLEMENTED/) {
|
||||
$resstring="$testcase=$result";
|
||||
$logstring="UNIMPLEMENTED due to execution result - $result";
|
||||
}else {
|
||||
$resstring="$testcase=FAILED=By autorun.pl. Unknown content of result file - $result";
|
||||
$logstring="FAILED due to strnge content of result file - $result";
|
||||
}
|
||||
} else {
|
||||
$resstring = "$testcase=FAILED=By autorun.pl: Can't open file with result.Test aborted or execution time so small";
|
||||
$logstring = "FAILED by autorun.pl: Can't open file with result.Test aborted or execution time so small";
|
||||
}
|
||||
if (-e "$curdir/core") {
|
||||
unless($ignorecore) {
|
||||
$resstring = "$testcase=FAILED=By autorun.pl. Test dumped core. The result of execution was: $resstring";
|
||||
$logstring = "FAILED by autorun.pl. Test DUMPED CORE. Original log was: $logstring";
|
||||
}else {
|
||||
$resstring.= " Warning: Coredump was ignored.";
|
||||
$logstring.= " Warning: Coredump was ignored."
|
||||
}
|
||||
}
|
||||
safeAppend $COMMON_RESULT_FILE, "$resstring\n";
|
||||
constructLogString "$logstring";
|
||||
}
|
||||
########################################################################
|
||||
#
|
||||
# running one test case
|
||||
#
|
||||
########################################################################
|
||||
sub runTestCase {
|
||||
my $testcase = shift(@_);
|
||||
%params=loadAllParams($testcase);
|
||||
$DELAY_EXTERNAL=getParam("DELAY_EXTERNAL");
|
||||
$DELAY_OF_CYCLE=getParam("DELAY_OF_CYCLE");
|
||||
if ($^O=~/Win32/) {
|
||||
runTestCaseWin($testcase);
|
||||
} else {
|
||||
print "Unix systems isn't well tested now. Should be done\n";
|
||||
runTestCaseUx($testcase);
|
||||
}
|
||||
}
|
||||
########################################################################
|
||||
#
|
||||
# running one test case under Unix
|
||||
#
|
||||
########################################################################
|
||||
sub runTestCaseUx {
|
||||
my $testcase = shift(@_);
|
||||
|
||||
print "========================================\n";
|
||||
$logstr="Running TestCase $testcase....";
|
||||
print "$logstr\n";
|
||||
constructLogString "$logstr";
|
||||
|
||||
$nom = $testcase;
|
||||
$nom =~ s/\/|:/_/g;
|
||||
$testlog = "$logdir/$nom.log";
|
||||
|
||||
if (open( TST, ">".$TEST_INIT_FILE)) {
|
||||
print TST "TEST_TOP_DIR=$topdir\n";
|
||||
print TST "BROWSER_BIN_DIR=".getParam("BROWSER_BIN_DIR")."\n";
|
||||
print TST "TEST_ID=$testcase\n";
|
||||
print TST "TEST_ARGUMENTS=".getCurrentTestArguments($testcase);
|
||||
close( TST) || print "WARNING: Can't close $TEST_INIT_FILE\n";
|
||||
} else {
|
||||
die "ERROR: Can't create $TEST_INIT_FILE $!\n";
|
||||
}
|
||||
|
||||
#Remove log files from previous execution
|
||||
(-f "$TEST_LOG_FILE") && unlink("$TEST_LOG_FILE");
|
||||
(-f "$TEST_RESULT_FILE") && unlink("$TEST_RESULT_FILE");
|
||||
(-f "$curdir/core") && unlink("$curdir/core");
|
||||
if (!defined($pid = fork())) {
|
||||
die "Can't fork: $!";
|
||||
} elsif ($pid == 0) { #Child process
|
||||
$args="-native -Djava.library.path=".getParam("BROWSER_BIN_DIR").":".$ENV{"LD_LIBRARY_PATH"};
|
||||
$ENV{"PATH"}=$ENV{"PATH"}.";".getParam("BROWSER_BIN_DIR");
|
||||
print "--Starting $javahome/$JAVA $args $runner_class $modifier $TEST_INIT_FILE\n";
|
||||
open( SAVEOUT, ">&STDOUT" ) || print "WARNING: Cann't backup STDOUT\n";
|
||||
open( SAVEERR, ">&STDERR" ) || print "WARNING: Cann't backup STDERR\n";
|
||||
open( STDOUT, ">$testlog" ) || print "WARNING: Cann't redirect STDOUT\n";
|
||||
open( STDERR, ">&STDOUT" ) || print "WARNING: Cann't redirect STDOUT\n";
|
||||
select STDERR; $|=1; select STDOUT; $|=1;
|
||||
exec("$javahome/$JAVA $args $runner_class $modifier $TEST_INIT_FILE") or print STDERR "ERROR:cann't start $javahome/$JAVA\n";
|
||||
die "Unfortunately exec behaviour .";
|
||||
}
|
||||
#Parent process
|
||||
$cnt = 0;
|
||||
while (true) {
|
||||
sleep($DELAY_OF_CYCLE);
|
||||
if (waitpid($pid,&WNOHANG)) { #If process aleady died ..
|
||||
checkResultFile();
|
||||
last;
|
||||
} else { #If process is still alive
|
||||
$cnt += $DELAY_OF_CYCLE;
|
||||
if ( $cnt >= $DELAY_EXTERNAL) {
|
||||
constructLogString "WARNING: Process doesn't succesfuly died. DELAY_OF_CYCLE should be increased";
|
||||
checkResultFile();
|
||||
kill 9, $pid;
|
||||
sleep(1);
|
||||
wait();# take exit code
|
||||
last;
|
||||
}
|
||||
}
|
||||
} # while with sleep
|
||||
|
||||
if (open(TEST_LOG, "$TEST_LOG_FILE")) {
|
||||
while (<TEST_LOG>) {
|
||||
chomp($_);
|
||||
constructLogString $_;
|
||||
}
|
||||
close(TEST_LOG);
|
||||
unlink("$TEST_LOG_FILE");
|
||||
}
|
||||
(-f "$TEST_RESULT_FILE") && unlink("$TEST_RESULT_FILE");
|
||||
(-f "$TEST_INIT_FILE") && unlink("$TEST_INIT_FILE");
|
||||
|
||||
}
|
||||
########################################################################
|
||||
#
|
||||
# running one test case under Win32
|
||||
#
|
||||
########################################################################
|
||||
|
||||
sub runTestCaseWin {
|
||||
my $testcase = shift(@_);
|
||||
do 'Win32\Process.pm' || die "Can't do Win32\Process.pm $!";
|
||||
|
||||
print "========================================\n";
|
||||
$logstr="Running TestCase $testcase....";
|
||||
print "$logstr\n";
|
||||
constructLogString "$logstr";
|
||||
|
||||
$nom = $testcase;
|
||||
$nom =~ s/\/|:/_/g;
|
||||
$testlog = "$logdir/$nom.log";
|
||||
|
||||
if (open( TST, ">".$TEST_INIT_FILE)) {
|
||||
print TST "TEST_TOP_DIR=$topdir\n";
|
||||
print TST "BROWSER_BIN_DIR=".getParam("BROWSER_BIN_DIR")."\n";
|
||||
print TST "TEST_ID=$testcase\n";
|
||||
print TST "TEST_ARGUMENTS=".getCurrentTestArguments($testcase);
|
||||
close( TST) || print "WARNING: Can't close $TEST_INIT_FILE\n";
|
||||
} else {
|
||||
die "ERROR: Can't create $TEST_INIT_FILE $!\n";
|
||||
}
|
||||
|
||||
#Remove log files from previous execution
|
||||
(-f "$TEST_LOG_FILE") && unlink("$TEST_LOG_FILE");
|
||||
(-f "$TEST_RESULT_FILE") && unlink("$TEST_RESULT_FILE");
|
||||
|
||||
$args="-Djava.library.path=".getParam("BROWSER_BIN_DIR");
|
||||
$ENV{"PATH"}=$ENV{"PATH"}.";".getParam("BROWSER_BIN_DIR");
|
||||
print "--Starting $javahome/$JAVA $args $runner_class $modifier $TEST_INIT_FILE\n";
|
||||
open( SAVEOUT, ">&STDOUT" ) || print "WARNING: Cann't backup STDOUT\n";
|
||||
open( SAVEERR, ">&STDERR" ) || print "WARNING: Cann't backup STDERR\n";
|
||||
open( STDOUT, ">$testlog" ) || print "WARNING: Cann't redirect STDOUT\n";
|
||||
open( STDERR, ">&STDOUT" ) || print "WARNING: Cann't redirect STDOUT\n";
|
||||
Win32::Process::Create($ProcessObj,
|
||||
"$javahome/$JAVA",
|
||||
"$javahome/$JAVA $args $runner_class $modifier $TEST_INIT_FILE",
|
||||
1,
|
||||
NORMAL_PRIORITY_CLASS,
|
||||
"$curdir" ) || die "ERROR:cann't start $JAVA\n";
|
||||
close( STDOUT ) || print "WARNING: Cann't close redirected STDOUT\n";
|
||||
close( STDERR ) || print "WARNING: Cann't close redirected STDERR\n";
|
||||
open( STDOUT, ">&SAVEOUT" ) || print "WARNING: Cann't restore STDOUT\n";
|
||||
open( STDERR, ">&SAVEERR" ) || print "WARNING: Cann't restore STDERR\n";
|
||||
|
||||
$cnt = 0;
|
||||
while (true) {
|
||||
sleep($DELAY_OF_CYCLE);
|
||||
#print("Running $topdir\\utils\\Killer.exe $testlog\n");
|
||||
system("$topdir\\utils\\Killer.exe $testlog");
|
||||
$ProcessObj->GetExitCode($exit_code);
|
||||
if ( $exit_code != $STILL_ALIVE ) { #If process aleady died ..
|
||||
constructLogString "Test terminated with exit code $exit_code.";
|
||||
checkResultFile() ;
|
||||
#if ( (! $temp_result) or ($exit_code != 0)) {
|
||||
last;
|
||||
} else { #If process is still alive
|
||||
$cnt += $DELAY_OF_CYCLE;
|
||||
if ( $cnt >= $DELAY_EXTERNAL) {
|
||||
checkResultFile();
|
||||
$ProcessObj->Kill(0);
|
||||
last;
|
||||
}
|
||||
}
|
||||
} # while with sleep
|
||||
|
||||
if (open(TEST_LOG, "$TEST_LOG_FILE")) {
|
||||
while (<TEST_LOG>) {
|
||||
chomp($_);
|
||||
print("Construct log string: $_");
|
||||
constructLogString $_;
|
||||
}
|
||||
close(TEST_LOG);
|
||||
unlink("$TEST_LOG_FILE");
|
||||
}
|
||||
(-f "$TEST_RESULT_FILE") && unlink("$TEST_RESULT_FILE");
|
||||
(-f "$TEST_INIT_FILE") && unlink("$TEST_INIT_FILE");
|
||||
|
||||
}
|
||||
##################################################################
|
||||
# main
|
||||
##################################################################
|
||||
|
||||
title();
|
||||
init();
|
||||
# process command-line parameters
|
||||
# and check for valid usage
|
||||
|
||||
$i=0;
|
||||
$modifier = "";
|
||||
$testcase = undef;
|
||||
$ignorecore = undef;
|
||||
$LST_IN = undef;
|
||||
$runtype = -1;
|
||||
while($i<=$#ARGV) {
|
||||
if ($ARGV[$i] eq "-i") {
|
||||
$ignorecore=1;
|
||||
$i++;
|
||||
next;
|
||||
}elsif ($ARGV[$i] eq "-m") {
|
||||
$modifier="-m";
|
||||
if($runtype==-1) {
|
||||
$runtype = 2;
|
||||
$LST_IN = "BWMixedTest.lst";
|
||||
}
|
||||
$i++;
|
||||
next;
|
||||
}elsif ($ARGV[$i] eq "-t") {
|
||||
if(defined $LST_IN) {
|
||||
usage();
|
||||
exit -1;
|
||||
}
|
||||
if(defined $ARGV[$i+1]) {
|
||||
$testcase = $ARGV[$i+1];
|
||||
$runtype = 1;
|
||||
$i+=2;
|
||||
next;
|
||||
} else {
|
||||
usage;
|
||||
exit -1;
|
||||
}
|
||||
}elsif ($ARGV[$i] eq "-f") {
|
||||
if(defined $testcase) {
|
||||
usage();
|
||||
exit -1;
|
||||
}
|
||||
if(defined $ARGV[$i+1]) {
|
||||
$LST_IN = $ARGV[$i+1];
|
||||
$runtype = 2;
|
||||
$i+=2;
|
||||
next;
|
||||
} else {
|
||||
usage;
|
||||
exit -1;
|
||||
}
|
||||
}else {
|
||||
usage();
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
if($runtype==-1) {
|
||||
$modifier = "";
|
||||
$testcase = "";
|
||||
$LST_IN = "BWTest.lst";
|
||||
$runtype = 2;
|
||||
}
|
||||
|
||||
# Prepare TXT log stream
|
||||
open( COMMON_LOG_FILE, ">$COMMON_LOG_FILE" ) || die("ERROR: Can't open $COMMON_LOG_FILE file... $!\n");
|
||||
select COMMON_LOG_FILE; $| = 1; select STDOUT;
|
||||
|
||||
constructLogHeader();
|
||||
|
||||
if ($runtype == 1){
|
||||
runTestCase($testcase);
|
||||
} else {
|
||||
(-f $LST_IN ) or die "ERROR: File $LST_IN doesn't exist";
|
||||
open( LST_IN, $LST_IN ) || die("ERROR: Can't open $LST_IN...\n");
|
||||
while( $testcase = <LST_IN> ) {
|
||||
chomp $testcase;
|
||||
$testcase=~s#^\s*|\s*$##g;
|
||||
if ( ($testcase =~ /^\s*#/)||($testcase eq "")) {
|
||||
next;
|
||||
}
|
||||
runTestCase($testcase);
|
||||
}
|
||||
}
|
||||
|
||||
constructLogFooter();
|
||||
constructHTML();
|
||||
chdir($curdir);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче