summaryrefslogtreecommitdiff
path: root/xmerge/source/palmtests/bin
diff options
context:
space:
mode:
Diffstat (limited to 'xmerge/source/palmtests/bin')
-rw-r--r--xmerge/source/palmtests/bin/README6
-rwxr-xr-xxmerge/source/palmtests/bin/rd24
-rwxr-xr-xxmerge/source/palmtests/bin/spose108
-rwxr-xr-xxmerge/source/palmtests/bin/verify_sane.pl110
4 files changed, 248 insertions, 0 deletions
diff --git a/xmerge/source/palmtests/bin/README b/xmerge/source/palmtests/bin/README
new file mode 100644
index 000000000000..36fbcc6e1298
--- /dev/null
+++ b/xmerge/source/palmtests/bin/README
@@ -0,0 +1,6 @@
+To run the spose script, you must set the following environmental variables:
+
+ POSE2_EXE = Directory and name of the POSE executable file.
+ POSE3_EXE = Directory and name of the POSE executable file.
+ POSE_PRC = Directory containing the PRC files to be loaded
+ into the emulator
diff --git a/xmerge/source/palmtests/bin/rd b/xmerge/source/palmtests/bin/rd
new file mode 100755
index 000000000000..db2dc56aee6b
--- /dev/null
+++ b/xmerge/source/palmtests/bin/rd
@@ -0,0 +1,24 @@
+#!/bin/ksh
+#
+# Directories commonly used by this script...
+#
+
+#export LBHOME=$ZPHOME/lib
+#export CVHOME=$ZPHOME/converters
+#export CVHOME=/export/home/test/qadir/qa-new/classes
+
+# Set up classpath to include needed ZenSync jars. Honor the users
+# CLASSPATH by leaving it first. This allows users to specify their
+# own versions of the jar files in their CLASSPATH if they wish to
+# override these defaults.
+#
+
+export CLASSPATH=$CLASSES_DIR/xerces.jar:$CLASSES_DIR/jmc.jar:$CLASSES_DIR/xmerge.jar:$CLASSES_DIR/minicalc.jar:$CLASSES_DIR/aportisdoc.jar:$CLASSES_DIR/wordsmith.jar
+
+echo "The classpath is $CLASSPATH"
+
+# Run the test driver, passing along args.
+#
+# java com.sun.star.comp.documentconversion.test.Driver $*
+java -cp $CLASSPATH org.openoffice.xmerge.test.Driver $*
+
diff --git a/xmerge/source/palmtests/bin/spose b/xmerge/source/palmtests/bin/spose
new file mode 100755
index 000000000000..29f6a9fe5218
--- /dev/null
+++ b/xmerge/source/palmtests/bin/spose
@@ -0,0 +1,108 @@
+#!/bin/perl
+#
+# spose - start pose
+#
+
+use Getopt::Std;
+
+# Location of needed files
+#
+$pose2_exe = $ENV{'POSE2_EXE'};
+$pose3_exe = $ENV{'POSE3_EXE'};
+$pose_prc = $ENV{'POSE_PRC'};
+
+
+if (getopts('23qmwo:r:d:v') != 1)
+{
+ &usage();
+}
+
+$apps_load = "";
+
+if ($opt_q)
+{
+ &add_app("$pose_prc/Quickword.PRC");
+}
+if ($opt_m)
+{
+ &add_app("$pose_prc/MiniCalc.prc");
+}
+if ($opt_w)
+{
+ &add_app("$pose_prc/WordSmith.PRC");
+}
+if ($opt_o)
+{
+ &add_app("$opt_o");
+}
+if ($opt_r)
+{
+ $run_prog .= "-run_app $opt_r";
+}
+if ($opt_d)
+{
+ $directory = $opt_d;
+ @files = `/bin/ls -1 $directory/*.pdb`;
+
+ for ($i=0; $i <= $#files; $i++)
+ {
+ $add_file = "$files[$i]";
+ chomp $add_file;
+ &add_app("$add_file");
+ }
+}
+
+if ($opt_3)
+{
+ $pose_exe = $pose3_exe;
+}
+else
+{
+ $pose_exe = $pose2_exe;
+}
+if ($pose_exe eq "")
+{
+ print "\nPose not found: Please set \n POSE2_EXE\n or POSE3_EXE\n";
+ exit 0;
+}
+if ($opt_v)
+{
+ print ("\n$pose_exe $apps_load $run_prog &\n\n");
+}
+else
+{
+ system ("$pose_exe $apps_load $run_prog &");
+}
+
+exit 0;
+
+sub usage
+{
+ print "\nUsage: getopt [ -m ] [ -q ] [ -w ] [ -o <PrcFile> ] [ -r <RunProg> ]\n";
+ print " -2 Runs pose version 3.2 [ current default ]\n";
+ print " -3 Runs pose version 3.3\n";
+ print " -d Load all PDB files in specified directory\n";
+ print " -m Load MiniCalc PRC file\n";
+ print " -q Load QuickWord PRC file\n";
+ print " -w Load WordSmith PRC file\n";
+ print " -o <PrcFile> Other PRC files to load\n";
+ print " -r <RunProg> Program to run on startup\n";
+ print " -v Display the command instead of running\n\n";
+ exit(-1);
+}
+
+sub add_app
+{
+ my $new_app = $_[0];
+
+ if ($apps_load ne "")
+ {
+ $apps_load .= ",";
+ }
+ else
+ {
+ $apps_load = "-load_apps ";
+ }
+
+ $apps_load .= "$new_app";
+}
diff --git a/xmerge/source/palmtests/bin/verify_sane.pl b/xmerge/source/palmtests/bin/verify_sane.pl
new file mode 100755
index 000000000000..dc085f3ddc44
--- /dev/null
+++ b/xmerge/source/palmtests/bin/verify_sane.pl
@@ -0,0 +1,110 @@
+#!/usr/bin/perl
+#########################################################################
+
+ #*************************************************************************
+ #
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+ #*************************************************************************
+
+####################################################################
+# File Name: template.pl
+# Version : 1.0
+# Project : XMerge
+# Author : Brian Cameron
+# Date : 5th Sept. 2001
+#
+#
+# Takes x and y from the command line and taps the screen there.
+# Assumes pose is already running.
+#
+##########################################################################
+
+use POSIX "sys_wait_h"; # Need this for waitpid with WNOHANG
+use EmRPC; # EmRPC::OpenConnection, CloseConnection
+use EmFunctions;
+use EmUtils;
+
+if ($#ARGV != 0)
+{
+ print "\nUsage: $0 timeout\n\n";
+ exit -1;
+}
+
+$timeout = $ARGV[0];
+
+if (!defined($up_pid = fork()))
+{
+ print "ERROR, problem forking.\n"
+}
+elsif ($up_pid)
+{
+ print "\nChecking to see if pose is started properly.\n";
+
+ # Parent process
+ #
+ sleep($timeout);
+
+ waitpid($up_pid, WNOHANG);
+
+ if (kill(0, $up_pid))
+ {
+ print "Pose did not start successfully...\n";
+ kill(9, $up_pid);
+ exit(-1);
+ }
+ else
+ {
+ # The child process exited okay, so we know it will not
+ # hang...but the open_connection will just die if pose
+ # isn't started...so try it in the parent.
+ #
+ open_connection();
+ close_connection();
+
+ print "Verified pose started successfully...\n";
+ exit(0);
+ }
+}
+else
+{
+ # Child process - Try to open/close the connection. This
+ # can hang if pose did not start properly...
+ #
+ open_connection();
+ close_connection();
+}
+
+sub open_connection
+{
+ print "opening connection\n";
+ EmRPC::OpenConnection(6415, "localhost");
+}
+
+sub close_connection
+{
+ print "closing connection\n";
+ EmRPC::CloseConnection();
+}
+