mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 03:44:58 +00:00
Integrated OJUnit with build scripts ("ant test" runs tests, "ant release" now pulls OJUnit from separate repo)
This commit is contained in:
1 parent
311939ecb9
commit
e51b1cb7e1
7 files changed
+145
-24
No files matched your search
@@ -27,20 +27,13 @@ mkdir -p $INSTALL_DIR/share
|
||||
|
||||
cp -fR objj/ $INSTALL_DIR/share/objj
|
||||
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/nib2cib $INSTALL_DIR/bin/nib2cib
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/objj $INSTALL_DIR/bin/objj
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/objjc $INSTALL_DIR/bin/objjc
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/steam $INSTALL_DIR/bin/steam
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/bake $INSTALL_DIR/bin/bake
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/press $INSTALL_DIR/bin/press
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/cplutil $INSTALL_DIR/bin/cplutil
|
||||
BINS=`ls objj/bin`
|
||||
for BIN in $BINS
|
||||
do
|
||||
ln -sf $INSTALL_DIR/share/objj/bin/$BIN $INSTALL_DIR/bin/$BIN
|
||||
chmod +x $INSTALL_DIR/bin/$BIN
|
||||
done
|
||||
|
||||
chmod +x $INSTALL_DIR/bin/nib2cib
|
||||
chmod +x $INSTALL_DIR/bin/objj
|
||||
chmod +x $INSTALL_DIR/bin/objjc
|
||||
chmod +x $INSTALL_DIR/bin/steam
|
||||
chmod +x $INSTALL_DIR/bin/bake
|
||||
chmod +x $INSTALL_DIR/bin/press
|
||||
chmod +x $INSTALL_DIR/share/objj/bin/*
|
||||
chmod +x $INSTALL_DIR/share/objj/lib/cat
|
||||
|
||||
@@ -48,7 +41,7 @@ cat <<EOT
|
||||
|
||||
Installation of the Objective-J tools to $INSTALL_DIR is almost complete!
|
||||
|
||||
Several environment variables must be set:
|
||||
Several environment variables should be set:
|
||||
|
||||
- PATH should include $INSTALL_DIR/bin:
|
||||
|
||||
@@ -62,7 +55,7 @@ cat <<EOT
|
||||
|
||||
(currently: $OBJJ_HOME)
|
||||
|
||||
- STEAM_BUILD should be set to the build directory of your choice (e.x. $HOME/objj_build):
|
||||
- STEAM_BUILD should be set (required) to the build directory of your choice (e.x. $HOME/objj_build):
|
||||
|
||||
export STEAM_BUILD=$HOME/objj_build
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<file name = "bake/build.xml" />
|
||||
<file name = "press/build.xml" />
|
||||
<file name = "cplutil/build.xml" />
|
||||
<file name = "ojunit/build.xml" />
|
||||
<file name = "Utilities/build.xml" />
|
||||
<file name = "NewApplication/build.xml" />
|
||||
</filelist>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
OJUnit resides in a separate repository. This build.xml pulls it from that repo:
|
||||
|
||||
git://github.com/280north/ojunit.git
|
||||
|
||||
Project page:
|
||||
|
||||
http://github.com/280north/ojunit
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version = "1.0"?>
|
||||
<project name = "ojunit" default = "build" basedir = "." >
|
||||
|
||||
<import file = "../../common.xml" />
|
||||
|
||||
<property name = "Build.Products" location = "${Build}/ojunit.build/${Configuration}" />
|
||||
<property name = "Build.ojunit" location = "${Build}/${Configuration}/ojunit" />
|
||||
|
||||
<target name = "clean">
|
||||
<delete dir = "${Build.ojunit}" verbose = "true" />
|
||||
<delete dir = "${Build.Products}" verbose = "true" />
|
||||
</target>
|
||||
|
||||
<target name = "build">
|
||||
</target>
|
||||
|
||||
<target name = "release" depends = "build">
|
||||
|
||||
<antcall target = "prepare-release" />
|
||||
|
||||
<git-clone-pull repository="git://github.com/280north/ojunit.git" dest="${Build.ojunit}" />
|
||||
|
||||
<mkdir dir = "${Build.Cappuccino.Tools.Lib}/ojunit" />
|
||||
<copy todir = "${Build.Cappuccino.Tools.Lib}/ojunit">
|
||||
<fileset dir = "${Build.ojunit}" includes = "**/*.j" />
|
||||
</copy>
|
||||
|
||||
<!-- remove following line if/when we move the shell script to the ojunit repo -->
|
||||
<copy file = "${basedir}/ojtest" tofile = "${Build.ojunit}/ojtest" />
|
||||
|
||||
<copy file = "${Build.ojunit}/ojtest" tofile = "${Build.Cappuccino.Tools.Bin}/ojtest" />
|
||||
|
||||
<chmod file = "${Build.Cappuccino.Tools.Bin}/ojtest" perm = "+x" />
|
||||
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
# if OBJJ_HOME isn't set, try to determine it
|
||||
if [ -z $OBJJ_HOME ]; then
|
||||
# get path of the executable
|
||||
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
|
||||
|
||||
# resolve symlinks
|
||||
if [ -h $SELF_PATH ]; then
|
||||
SELF_PATH=`readlink $SELF_PATH`
|
||||
fi
|
||||
|
||||
# get second ancestor directory
|
||||
SELF_DIR=`dirname $SELF_PATH`
|
||||
export OBJJ_HOME=`dirname $SELF_DIR`
|
||||
|
||||
# check to ensure it exists, print message
|
||||
if [ -d $OBJJ_HOME ]; then
|
||||
echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2
|
||||
else
|
||||
echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
OBJJ_LIB="$OBJJ_HOME/lib"
|
||||
|
||||
OJTEST="$OBJJ_LIB/ojunit/OJTestRunnerText.j"
|
||||
|
||||
# convert paths for Cygwin
|
||||
if [[ `uname` == CYGWIN* ]]; then
|
||||
OBJJ_HOME=`cygpath -w "$OBJJ_HOME"`
|
||||
OJTEST=`cygpath -w "$OJTEST"`
|
||||
fi
|
||||
|
||||
objj $OJTEST $@
|
||||
@@ -62,9 +62,17 @@
|
||||
<antcall target = "install-tools" />
|
||||
</target>
|
||||
|
||||
<target name = "update-install">
|
||||
<antcall target = "release" />
|
||||
<target name = "update-install" depends = "release">
|
||||
<antcall target = "install-tools" />
|
||||
</target>
|
||||
|
||||
<target name = "test">
|
||||
<ojtest>
|
||||
<tests>
|
||||
<fileset dir = "Tests/Foundation" includes = "*.j"/>
|
||||
<fileset dir = "Tests/AppKit" includes = "*.j"/>
|
||||
</tests>
|
||||
</ojtest>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
+46
-7
@@ -10,18 +10,18 @@
|
||||
|
||||
<property name = "Build.Cappuccino" location = "${Build}/Cappuccino" />
|
||||
|
||||
<property name = "Build.Cappuccino.Starter" location = "${Build}/Cappuccino/Starter" />
|
||||
<property name = "Build.Cappuccino.Starter" location = "${Build.Cappuccino}/Starter" />
|
||||
<property name = "Build.Cappuccino.Starter.Frameworks" location = "${Build.Cappuccino.Starter}/Frameworks" />
|
||||
|
||||
<property name = "Build.Cappuccino.Tools" location = "${Build}/Cappuccino/Tools" />
|
||||
<property name = "Build.Cappuccino.Tools" location = "${Build.Cappuccino}/Tools" />
|
||||
<property name = "Build.Cappuccino.Tools.Frameworks" location = "${Build.Cappuccino.Tools}/Frameworks" />
|
||||
|
||||
<property name = "Build.Cappuccino.Tools.Objj" location = "${Build.Cappuccino.Tools}/objj" />
|
||||
|
||||
<property name = "Build.Cappuccino.Tools.Bin" location = "${Build.Cappuccino.Tools}/objj/bin" />
|
||||
<property name = "Build.Cappuccino.Tools.Lib" location = "${Build.Cappuccino.Tools}/objj/lib" />
|
||||
<property name = "Build.Cappuccino.Tools.Lib.Frameworks" location = "${Build.Cappuccino.Tools}/objj/lib/Frameworks" />
|
||||
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Rhino" location = "${Build.Cappuccino.Tools}/objj/lib/Frameworks-Rhino" />
|
||||
<property name = "Build.Cappuccino.Tools.Bin" location = "${Build.Cappuccino.Tools.Objj}/bin" />
|
||||
<property name = "Build.Cappuccino.Tools.Lib" location = "${Build.Cappuccino.Tools.Objj}/lib" />
|
||||
<property name = "Build.Cappuccino.Tools.Lib.Frameworks" location = "${Build.Cappuccino.Tools.Lib}/Frameworks" />
|
||||
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Rhino" location = "${Build.Cappuccino.Tools.Lib}/Frameworks-Rhino" />
|
||||
|
||||
<property name = "Build.Cappuccino.Tools.Editors" location = "${Build.Cappuccino.Tools}/Editors" />
|
||||
|
||||
@@ -132,6 +132,45 @@
|
||||
</sequential>
|
||||
|
||||
</macrodef>
|
||||
|
||||
<!-- git tasks -->
|
||||
|
||||
|
||||
<macrodef name = "git">
|
||||
<attribute name = "command" />
|
||||
<attribute name = "dir" default = "" />
|
||||
<element name = "args" optional = "true" />
|
||||
<sequential>
|
||||
<echo message = "git @{command}" />
|
||||
<exec executable = "git" dir = "@{dir}">
|
||||
<arg value = "@{command}" />
|
||||
<args/>
|
||||
</exec>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name = "git-clone-pull">
|
||||
<attribute name = "repository" />
|
||||
<attribute name = "dest" />
|
||||
<sequential>
|
||||
<git command = "clone">
|
||||
<args>
|
||||
<arg value = "@{repository}" />
|
||||
<arg value = "@{dest}" />
|
||||
</args>
|
||||
</git>
|
||||
<git command = "pull" dir = "@{dest}" />
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<!-- ojtest task -->
|
||||
|
||||
<macrodef name = "ojtest">
|
||||
<attribute name = "frameworks" default = "${env.STEAM_BUILD}/Release" />
|
||||
<element name = "tests" />
|
||||
<sequential>
|
||||
<apply executable = "ojtest" parallel = "true">
|
||||
<tests/>
|
||||
</apply>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</project>
|
||||
Reference in new issue
Block a user